1
0
mirror of https://github.com/golang/go synced 2024-09-29 20:34:36 -06:00

cmd/dist: detect gohostarch on netbsd/arm64 hosts

On netbsd/arm64 `uname -m` reports `evbarm` which is mapped to
gohostarch=arm. Fix this by checking for "aarch64" in `uname -p` output
to fix self-hosted build on netbsd/arm64.

Updates #30824

Change-Id: I0f0450ff35af0bec51aeec3b210143ba892216c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/257643
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Benny Siegert <bsiegert@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
This commit is contained in:
Tobias Klauser 2020-09-26 16:30:02 +02:00 committed by Benny Siegert
parent f5c3eda4c9
commit ad618689ef

View File

@ -108,6 +108,9 @@ func main() {
gohostarch = "arm64"
case strings.Contains(out, "arm"):
gohostarch = "arm"
if gohostos == "netbsd" && strings.Contains(run("", CheckExit, "uname", "-p"), "aarch64") {
gohostarch = "arm64"
}
case strings.Contains(out, "ppc64le"):
gohostarch = "ppc64le"
case strings.Contains(out, "ppc64"):