From 5166bde386071dbcd9e8aab0648f328714e75556 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 26 Oct 2023 20:26:53 +0200 Subject: [PATCH] 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. --- changelog/unreleased/issue-4540 | 6 ++++++ helpers/build-release-binaries/main.go | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 changelog/unreleased/issue-4540 diff --git a/changelog/unreleased/issue-4540 b/changelog/unreleased/issue-4540 new file mode 100644 index 000000000..9a706141e --- /dev/null +++ b/changelog/unreleased/issue-4540 @@ -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 diff --git a/helpers/build-release-binaries/main.go b/helpers/build-release-binaries/main.go index f14f60db6..81d126b00 100644 --- a/helpers/build-release-binaries/main.go +++ b/helpers/build-release-binaries/main.go @@ -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()