fix cross compilation for arm platforms
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
d730d550e2
commit
12558c8d6e
1 changed files with 15 additions and 1 deletions
|
@ -47,11 +47,25 @@ hash_files() {
|
||||||
;;
|
;;
|
||||||
linux/arm)
|
linux/arm)
|
||||||
case "${GOARM}" in
|
case "${GOARM}" in
|
||||||
5 | "")
|
5)
|
||||||
export CC="${CC:-arm-linux-gnueabi-gcc}"
|
export CC="${CC:-arm-linux-gnueabi-gcc}"
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
|
export CGO_CFLAGS="-march=armv5t"
|
||||||
|
export CGO_CXXFLAGS="-march=armv5t"
|
||||||
|
;;
|
||||||
|
6)
|
||||||
|
export CC="${CC:-arm-linux-gnueabi-gcc}"
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export CGO_CFLAGS="-march=armv6"
|
||||||
|
export CGO_CXXFLAGS="-march=armv6"
|
||||||
;;
|
;;
|
||||||
7)
|
7)
|
||||||
|
export CC="${CC:-arm-linux-gnueabihf-gcc}"
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export CGO_CFLAGS="-march=armv7-a"
|
||||||
|
export CGO_CXXFLAGS="-march=armv7-a"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
export CC="${CC:-arm-linux-gnueabihf-gcc}"
|
export CC="${CC:-arm-linux-gnueabihf-gcc}"
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue