mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-21 14:31:02 +02:00
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:
parent
2131ff539f
commit
928c03bd09
@ -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'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user