From 928c03bd098420163b14dcfa6867024dc47a2639 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 17 Jun 2015 16:57:57 -0700 Subject: [PATCH] app-emulation/docker: Fix cross compile builds Set go environment variables needed for cross compiling. Signed-off-by: Geoff Levand --- .../app-emulation/docker/docker-9999.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild index c1f45a56b6..280e04359b 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild @@ -154,6 +154,10 @@ src_prepare() { epatch_user } +go_get_arch() { + echo ${ARCH} +} + src_compile() { # if we treat them right, Docker's build scripts will set up a # reasonable GOPATH for us @@ -190,6 +194,11 @@ src_compile() { unset DOCKER_EXPERIMENTAL fi + export GOARCH=$(go_get_arch) + export CGO_ENABLED=1 + export CC=$(tc-getCC) + export CXX=$(tc-getCXX) + # time to build! ./hack/make.sh dynbinary || die 'dynbinary failed'