Only support ARMv6 on ARM platforms

Go 1.21 has switched the default from GOARM=5 to GOARM=7. So far there
have been complaints from Raspberry Pi 1 users, as the first raspberry
pi version only supports ARMv6. Exclude older ARM versions as these are
likely not relevant (rest-server also only supports ARMv6/7) and enforce
the use of software floating point emulation.
This commit is contained in:
Michael Eischer 2023-10-26 20:26:53 +02:00
parent 550be5c1e9
commit 5166bde386
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,6 @@
Change: Require at least ARMv6 for ARM binaries
The official release binaries of restic now require at least ARMv6 support for ARM platforms.
https://github.com/restic/restic/issues/4540
https://github.com/restic/restic/pull/4542

View file

@ -125,6 +125,10 @@ func build(sourceDir, outputDir, goos, goarch string) (filename string) {
"GOOS="+goos,
"GOARCH="+goarch,
)
if goarch == "arm" {
// the raspberry pi 1 only supports the ARMv6 instruction set
c.Env = append(c.Env, "GOARM=6")
}
verbose("run %v %v in %v", "go", c.Args, c.Dir)
err := c.Run()