-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script/lib.sh: set GOARM=5 for armel, GOARM=6 for armhf #4034
Conversation
https://wiki.debian.org/ArmHardFloatPort
Debian wiki conflicts with Golang wiki. |
https://wiki.debian.org/RaspberryPi
Looks like So it looks like this PR still makes a sense for Raspbian users. |
"armhf" means ARMv7 for Debian, ARMv6 for Raspbian. ARMv6 is chosen here for compatibility. https://wiki.debian.org/RaspberryPi > Raspberry Pi OS builds a single image for all of the Raspberry families, > so you will get an armhf 32-bit, hard floating-point system, but built > for the ARMv6 ISA (with VFP2), unlike Debian's ARMv7 ISA (with VFP3) > port. Prior to this commit, the script was setting GOARM=6 for armel, GOARM=7 for armhf. Fix issue 4033 Signed-off-by: Akihiro Suda <[email protected]>
42c0601
to
531e29e
Compare
Originally, these values for My guess is https://wiki.debian.org/ArmHardFloatPort (last modified in 2017) is wrong/outdated to say armhf requires v7, since the other two sources say v6. OTOH https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html says
Meaning, even v7 can require soft-float, depending on the hardware. So, it's a maze. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, since no one ever complained about how we build our binaries, maybe we are doing it right?
The Debian wiki isn't outdated; rather within Debian (read: Raspbian is not Debian), there is officially no v6 (hence the Raspbian rebuild), only v5 (armel) and v7 (armhf). It might be better to use less ambiguous names like armv5, armv6, armv7, but generally armv5 binaries will work fine on both v5 and v6 devices, so this change is sane IMO. |
For (up to date) baselines within Debian, https://wiki.debian.org/ArchitectureSpecificsMemo#Architecture_baselines is probably a better reference. |
Yes, I think this is what we should do @AkihiroSuda, instead of using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but maybe we should change the naming as suggested by @tianon
Not in this PR, as it will break third-party installation scripts that curls runc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
https://github.com/golang/go/wiki/GoArm#supported-operating-systems
Prior to this commit, the script was setting GOARM=6 for armel, GOARM=7 for armhf.
Fix #4033