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>
// 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 == "" {