hack: check if cross-compiling before setting ARM target name
@@ -16,6 +16,8 @@ source "${MAKEDIR}/.go-autogen"
(
export GOGC=${DOCKER_BUILD_GOGC:-1000}
+ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" ]; then
+ # must be cross-compiling!
if [ "$(go env GOOS)/$(go env GOARCH)" = "linux/arm" ]; then
# specify name of the target ARM architecture
case "$(go env GOARM)" in
@@ -33,6 +35,7 @@ source "${MAKEDIR}/.go-autogen"
;;
esac
fi
+ fi
# -buildmode=pie is not supported on Windows arm64 and Linux mips*, ppc64be
# https://github.com/golang/go/blob/go1.19.4/src/cmd/internal/sys/supported.go#L125-L132
