]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: detect gohostarch for openbsd/mips64
authorJoel Sing <joel@sing.id.au>
Tue, 25 Aug 2020 17:18:30 +0000 (03:18 +1000)
committerJoel Sing <joel@sing.id.au>
Sun, 18 Oct 2020 08:32:19 +0000 (08:32 +0000)
On OpenBSD/octeon `uname -m` returns 'octeon' and we need `uname -p` to determine
the processor type (mips64).

Update #40995

Change-Id: I37c53ca2c372ab958fff17917d82d41f4b0a0393
Reviewed-on: https://go-review.googlesource.com/c/go/+/250583
Trust: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/dist/main.go

index 37fc5223563e9a96c743dfefa085981555e7b93e..37de1acc317b348e2c72cb5c1687030157b34329 100644 (file)
@@ -133,6 +133,10 @@ func main() {
                        if strings.Contains(run("", CheckExit, "uname", "-v"), "RELEASE_ARM64_") {
                                gohostarch = "arm64"
                        }
+               case gohostos == "openbsd":
+                       if strings.Contains(run("", CheckExit, "uname", "-p"), "mips64") {
+                               gohostarch = "mips64"
+                       }
                default:
                        fatalf("unknown architecture: %s", out)
                }