Commit a21a6e44 authored by Joel Sing's avatar Joel Sing Committed by Brad Fitzpatrick

cmd/dist: handle arm64 as a machine hardware name

OpenBSD/arm64 reports itself as arm64 from `uname -m` - this currently
matches as gohostarch=arm, rather than gohostarch=arm64. Correct this
by matching on both aarch64 and arm64 (the alternative would be to use
`uname -p`, however that's likely to cause upset elsewhere).

Updates #31656

Change-Id: I7b2da93495d808e704caf032b3fadc984077769e
Reviewed-on: https://go-review.googlesource.com/c/go/+/173598Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent e308d41f
...@@ -103,10 +103,10 @@ func main() { ...@@ -103,10 +103,10 @@ func main() {
gohostarch = "amd64" gohostarch = "amd64"
case strings.Contains(out, "86"): case strings.Contains(out, "86"):
gohostarch = "386" gohostarch = "386"
case strings.Contains(out, "aarch64"), strings.Contains(out, "arm64"):
gohostarch = "arm64"
case strings.Contains(out, "arm"): case strings.Contains(out, "arm"):
gohostarch = "arm" gohostarch = "arm"
case strings.Contains(out, "aarch64"):
gohostarch = "arm64"
case strings.Contains(out, "ppc64le"): case strings.Contains(out, "ppc64le"):
gohostarch = "ppc64le" gohostarch = "ppc64le"
case strings.Contains(out, "ppc64"): case strings.Contains(out, "ppc64"):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment