]> Cypherpunks repositories - gostls13.git/commit
cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabled
authorElias Naur <elias.naur@gmail.com>
Thu, 6 Feb 2014 17:11:00 +0000 (09:11 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 6 Feb 2014 17:11:00 +0000 (09:11 -0800)
commit2dc759d7c69cbb0800de53d6ca391c703ad42d9c
tree86246afbb5bb41c41f957078cc18f1466660f30f
parent76c9182523c26f371ef80436bb230692337064cd
cmd/go, cmd/cgo, make.bash: cross compiling with cgo enabled

Introduce two new environment variables, CC_FOR_TARGET and CXX_FOR_TARGET.
CC_FOR_TARGET defaults to CC and is used when compiling for GOARCH, while
CC remains for compiling for GOHOSTARCH.
CXX_FOR_TARGET defaults to CXX and is used when compiling C++ code for
GOARCH.

CGO_ENABLED defaults to disabled when cross compiling and has to be
explicitly enabled.

Update #4714

LGTM=minux.ma, iant
R=golang-codereviews, minux.ma, iant, rsc, dominik.honnef
CC=golang-codereviews
https://golang.org/cl/57100043
src/cmd/dist/a.h
src/cmd/dist/build.c
src/cmd/dist/buildgo.c
src/cmd/go/build.go
src/make.bash
src/pkg/go/build/build.go