Skip to content

Commit a21a6e4

Browse files
4a6f656cbradfitz
authored andcommitted
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/+/173598 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent e308d41 commit a21a6e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cmd/dist/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ func main() {
103103
gohostarch = "amd64"
104104
case strings.Contains(out, "86"):
105105
gohostarch = "386"
106+
case strings.Contains(out, "aarch64"), strings.Contains(out, "arm64"):
107+
gohostarch = "arm64"
106108
case strings.Contains(out, "arm"):
107109
gohostarch = "arm"
108-
case strings.Contains(out, "aarch64"):
109-
gohostarch = "arm64"
110110
case strings.Contains(out, "ppc64le"):
111111
gohostarch = "ppc64le"
112112
case strings.Contains(out, "ppc64"):

0 commit comments

Comments
 (0)