mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 23:16:58 +02:00
overlay coreos/config: Fix cross-compilation of docker and docker-cli
This commit is contained in:
parent
6b8fcce30f
commit
709f118084
12
sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker
vendored
Normal file
12
sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# Fix cross-compilation by setting up the environment properly.
|
||||
#
|
||||
# This is what go-module_src_unpack does, but docker does not use it.
|
||||
cros_pre_src_unpack_set_build_env() {
|
||||
if use amd64 || use arm || use arm64 ||
|
||||
( use ppc64 && [[ $(tc-endian) == "little" ]] ) || use s390 || use x86; then
|
||||
GOFLAGS="-buildmode=pie ${GOFLAGS}"
|
||||
fi
|
||||
GOFLAGS="${GOFLAGS} -p=$(makeopts_jobs)"
|
||||
|
||||
go-env_set_compile_environment
|
||||
}
|
12
sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker-cli
vendored
Normal file
12
sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker-cli
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# Fix cross-compilation by setting up the environment properly.
|
||||
#
|
||||
# This is what go-module_src_unpack does, but docker does not use it.
|
||||
cros_pre_src_unpack_set_build_env() {
|
||||
if use amd64 || use arm || use arm64 ||
|
||||
( use ppc64 && [[ $(tc-endian) == "little" ]] ) || use s390 || use x86; then
|
||||
GOFLAGS="-buildmode=pie ${GOFLAGS}"
|
||||
fi
|
||||
GOFLAGS="${GOFLAGS} -p=$(makeopts_jobs)"
|
||||
|
||||
go-env_set_compile_environment
|
||||
}
|
Loading…
Reference in New Issue
Block a user