]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: add support for openbsd/arm64
authorJoel Sing <joel@sing.id.au>
Fri, 26 Apr 2019 16:36:34 +0000 (02:36 +1000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 27 Apr 2019 18:17:28 +0000 (18:17 +0000)
Updates #31656

Change-Id: If481df050cd879f7c7c22a79c17c33af00a8b389
Reviewed-on: https://go-review.googlesource.com/c/go/+/174125
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/build.go
src/cmd/dist/main.go

index 6b58a04946b2c9b8826a0dadb717d71cab855f37..5edff52f87cf68860c32b8a764101be339ff5189 100644 (file)
@@ -1514,6 +1514,7 @@ var cgoEnabled = map[string]bool{
        "openbsd/386":     true,
        "openbsd/amd64":   true,
        "openbsd/arm":     true,
+       "openbsd/arm64":   false,
        "plan9/386":       false,
        "plan9/amd64":     false,
        "plan9/arm":       false,
index 55d5be3e4354a28ffeb21a516ed4930541b105cf..9be2fff37a4ad7cd22573876a094d47505d06e12 100644 (file)
@@ -71,8 +71,9 @@ func main() {
        case "openbsd":
                // The gcc available on OpenBSD armv7 is old/inadequate (for example, lacks
                // __sync_fetch_and_*/__sync_*_and_fetch) and will likely be removed in the
-               // not-to-distant future - use clang instead.
-               if runtime.GOARCH == "arm" {
+               // not-to-distant future - use clang instead. OpenBSD arm64 does not ship
+               // with gcc.
+               if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" {
                        defaultclang = true
                }
        case "plan9":