mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-06 08:40:43 +00:00
Directly accept GOARM env var for ARM version
As GOARCH defaults to 'arm' on arm systems this allows packagers to specify the arm version by setting the GOARM env var to 5, 6 or 7.
This commit is contained in:
parent
a564510c49
commit
59af9809fe
6
build.go
6
build.go
@ -75,8 +75,14 @@ func main() {
|
|||||||
case "386", "amd64", "armv5", "armv6", "armv7":
|
case "386", "amd64", "armv5", "armv6", "armv7":
|
||||||
break
|
break
|
||||||
case "arm":
|
case "arm":
|
||||||
|
switch os.Getenv("GOARM") {
|
||||||
|
case "5", "6", "7":
|
||||||
|
goarch += "v" + os.Getenv("GOARM")
|
||||||
|
break
|
||||||
|
default:
|
||||||
log.Println("Invalid goarch \"arm\". Use one of \"armv5\", \"armv6\", \"armv7\".")
|
log.Println("Invalid goarch \"arm\". Use one of \"armv5\", \"armv6\", \"armv7\".")
|
||||||
log.Fatalln("Note that producing a correct \"armv5\" binary requires a rebuilt stdlib.")
|
log.Fatalln("Note that producing a correct \"armv5\" binary requires a rebuilt stdlib.")
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
log.Printf("Unknown goarch %q; proceed with caution!", goarch)
|
log.Printf("Unknown goarch %q; proceed with caution!", goarch)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user