Skip to content

Commit

Permalink
cmd/dist: handle arm64 as a machine hardware name
Browse files Browse the repository at this point in the history
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/+/173598
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
4a6f656c authored and bradfitz committed Apr 24, 2019
1 parent e308d41 commit a21a6e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/dist/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ func main() {
gohostarch = "amd64"
case strings.Contains(out, "86"):
gohostarch = "386"
case strings.Contains(out, "aarch64"), strings.Contains(out, "arm64"):
gohostarch = "arm64"
case strings.Contains(out, "arm"):
gohostarch = "arm"
case strings.Contains(out, "aarch64"):
gohostarch = "arm64"
case strings.Contains(out, "ppc64le"):
gohostarch = "ppc64le"
case strings.Contains(out, "ppc64"):
Expand Down

0 comments on commit a21a6e4

Please sign in to comment.