]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: default to clang on OpenBSD
authorIan Lance Taylor <iant@golang.org>
Thu, 5 Sep 2019 23:04:06 +0000 (16:04 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 6 Sep 2019 04:54:12 +0000 (04:54 +0000)
OpenBSD ships with GCC 4.2, the last version of GCC that used GPLv2.
As that is quite old (current GCC version is GCC 9, GCC 4.2 was
released in 2007), default to clang.

Change-Id: Ib93e7b4f4f3ffb9e047e60ffca3696d26ab08aac
Reviewed-on: https://go-review.googlesource.com/c/go/+/193621
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/main.go

index 07361d828f7d55b02bc9e7c65800b231722cf841..3e54915122f3312e14974025cfec9c76d88a169d 100644 (file)
@@ -66,13 +66,8 @@ func main() {
                // Since FreeBSD 10 gcc is no longer part of the base system.
                defaultclang = true
        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. OpenBSD arm64 does not ship
-               // with gcc.
-               if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" {
-                       defaultclang = true
-               }
+               // OpenBSD ships with GCC 4.2, which is now quite old.
+               defaultclang = true
        case "plan9":
                gohostarch = os.Getenv("objtype")
                if gohostarch == "" {