mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
enable cross-compile CC config for non-amd64
Currently target CC can only be set if the host platform is linux/amd64 . If target is already set in the environment it is always safe to use it and enable cgo. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
b3dd01da49
commit
f19f22b43e
@ -416,6 +416,13 @@ kube::golang::set_platform_envs() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if CC is defined for platform then always enable it
|
||||||
|
ccenv=$(echo "$platform" | awk -F/ '{print "KUBE_" toupper($1) "_" toupper($2) "_CC"}')
|
||||||
|
if [ -n "${!ccenv-}" ]; then
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export CC="${!ccenv}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
kube::golang::unset_platform_envs() {
|
kube::golang::unset_platform_envs() {
|
||||||
|
Loading…
Reference in New Issue
Block a user