app-emulation/docker: Fix cross compile builds

Set go environment variables needed for cross compiling.

Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
Geoff Levand 2015-06-17 16:57:57 -07:00
parent 2131ff539f
commit 928c03bd09

View File

@ -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'