[Docker-maint] Bug#776401: [Pkg-golang-devel] Bug#776401: src:golang: Set CGO_ENABLED for all platforms

Tianon Gravi admwiggin at gmail.com
Wed Mar 4 17:32:40 UTC 2015


On 27 January 2015 at 09:51, Hilko Bengen <bengen at debian.org> wrote:
> Apparently, it is possible to build a CGO-enabled Golang cross compiler
> on all platforms if CGO_ENABLED=1 is set at build-time. I have
> successfully built Windows executables that use fopen(), fread()
> functions from the C standard library using something like:
>
> $ CC=i686-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows GOARCH=i386 go build ...
>
> Please consider adding the simple patch attached below.

Does compiling the stdlib with this force-enabled have any
implications for existing users?  Also, what's the impact on the
future Go 1.5, especially the new, simpler cross-compile[1] that no
longer requires rebuilding the entire standard library and toolchain
up front like we do currently?

♥,
- Tianon
  4096R / B42F 6819 007F 00F8 8E36  4FD4 036A 9C25 BF35 7DD4

[1]: http://dave.cheney.net/2015/03/03/cross-compilation-just-got-a-whole-lot-better-in-go-1-5




More information about the Docker-maint mailing list