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:
commit
42a054473b
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue