gomini / go-mips32

Golang1.4.2 based gc compiler ported to MIPS32/LE. Hello OpenWRT~
BSD 3-Clause "New" or "Revised" License
136 stars 34 forks source link

cgo support #2

Open devrn opened 8 years ago

devrn commented 8 years ago

I tried to compile this project with CGO_ENABLED=1 GOOS=linux GOARCH=mips32 ./make.bash and I got errors:

/tmp/go-build633924730/runtime/cgo/_obj/gcc_util.o: In function x_cgo_thread_start': runtime/cgo/gcc_util.c:46: undefined reference to_cgo_sys_thread_start' collect2: error: ld returned 1 exit status

looks like there is a need to create src/runtime/cgo/gcc_linux_mips32x.c and src/runtime/cgo/asm_mips32x.s to do it. Content of the first file is pretty obvious and can be moslty copied form src/runtime/cgo/gcc_linux_XXX.c file, but the second file require mips32 assembly and I have no idea how to implement it.