1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #39546 from jiahongxujia/master

imporve hardcoded CC on cross compile
This commit is contained in:
Sebastiaan van Stijn 2019-07-17 17:43:44 +02:00 committed by GitHub
commit 42a054473b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,27 +44,27 @@ if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARC
# must be cross-compiling!
case "$(go env GOOS)/$(go env GOARCH)" in
windows/amd64)
export CC=x86_64-w64-mingw32-gcc
export CC="${CC:-x86_64-w64-mingw32-gcc}"
export CGO_ENABLED=1
;;
linux/arm)
case "${GOARM}" in
5|"")
export CC=arm-linux-gnueabi-gcc
export CC="${CC:-arm-linux-gnueabi-gcc}"
export CGO_ENABLED=1
;;
7)
export CC=arm-linux-gnueabihf-gcc
export CC="${CC:-arm-linux-gnueabihf-gcc}"
export CGO_ENABLED=1
;;
esac
;;
linux/arm64)
export CC=aarch64-linux-gnu-gcc
export CC="${CC:-aarch64-linux-gnu-gcc}"
export CGO_ENABLED=1
;;
linux/amd64)
export CC=x86_64-linux-gnu-gcc
export CC="${CC:-x86_64-linux-gnu-gcc}"
export CGO_ENABLED=1
;;
esac