Skip to content

Commit ee45b9b

Browse files
authored
Merge pull request #4034 from AkihiroSuda/fix-goarm
script/lib.sh: set GOARM=5 for armel, GOARM=6 for armhf
2 parents 4d948b1 + 531e29e commit ee45b9b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

script/lib.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,21 @@ function set_cross_vars() {
4545
armel)
4646
HOST=arm-${PLATFORM}eabi
4747
GOARCH=arm
48-
GOARM=6
48+
GOARM=5
4949
;;
5050
armhf)
5151
HOST=arm-${PLATFORM}eabihf
5252
GOARCH=arm
53-
GOARM=7
53+
# "armhf" means ARMv7 for Debian, ARMv6 for Raspbian.
54+
# ARMv6 is chosen here for compatibility.
55+
#
56+
# https://wiki.debian.org/RaspberryPi
57+
#
58+
# > Raspberry Pi OS builds a single image for all of the Raspberry families,
59+
# > so you will get an armhf 32-bit, hard floating-point system, but built
60+
# > for the ARMv6 ISA (with VFP2), unlike Debian's ARMv7 ISA (with VFP3)
61+
# > port.
62+
GOARM=6
5463
;;
5564
ppc64le)
5665
HOST=powerpc64le-${PLATFORM}

0 commit comments

Comments
 (0)