Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But the question is: Who knows what and what not to do with libc?

"But Go compiled it just fine..."



I build most of my Go binaries with cgo disabled for this, and many other reasons.

In case you don't know, cross-building with GOOS/GOARCH will imply CGO_ENABLED=0 unless you also specify CC_FOR_${GOOS}_${GOARCH}; I cross-build most of my code for (and test it on) amd64, arm64, linux, openbsd, and darwin.

Go will sometimes link to the local libc for network-related functionality if you don't disable cgo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: