Merge pull request #33803 from ixdy/go1.7-darwin-client-binaries
Automatic merge from submit-queue Use patched golang1.7.1 for cross-builds targeting darwin This PR extends #32517 to use the patched go1.7.1 introduced by that PR to build all darwin targets (e.g. kubectl). This is necessary because binaries built with earlier versions of Go regularly segfault on macOS Sierra (see #32999 and #33070). This solution is somewhat hacky, but we intend to cherry-pick this to 1.4, and switching all of 1.4 to build with go1.7.1 is very high risk. I haven't yet pushed the cross build image yet, so this will fail to build. Will test locally and update with results. First step of fixing #33801. cc @luxas @pwittrock @david-mcmahon @liggitt @smarterclayton @jfrazelle @Starefossen @gerred
This commit is contained in:
@@ -236,6 +236,7 @@ kube::golang::set_platform_envs() {
|
||||
if [[ ${platform} == "linux/arm" ]]; then
|
||||
export CGO_ENABLED=1
|
||||
export CC=arm-linux-gnueabi-gcc
|
||||
# See https://github.com/kubernetes/kubernetes/issues/29904
|
||||
export GOROOT=${K8S_PATCHED_GOROOT}
|
||||
elif [[ ${platform} == "linux/arm64" ]]; then
|
||||
export CGO_ENABLED=1
|
||||
@@ -243,6 +244,9 @@ kube::golang::set_platform_envs() {
|
||||
elif [[ ${platform} == "linux/ppc64le" ]]; then
|
||||
export CGO_ENABLED=1
|
||||
export CC=powerpc64le-linux-gnu-gcc
|
||||
elif [[ ${platform} == "darwin/"* ]]; then
|
||||
# See https://github.com/kubernetes/kubernetes/issues/32999
|
||||
export GOROOT=${K8S_PATCHED_GOROOT}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user