Commit 3aae49b8 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/dist: default to clang on OpenBSD

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 1406ece4
...@@ -66,13 +66,8 @@ func main() { ...@@ -66,13 +66,8 @@ func main() {
// Since FreeBSD 10 gcc is no longer part of the base system. // Since FreeBSD 10 gcc is no longer part of the base system.
defaultclang = true defaultclang = true
case "openbsd": case "openbsd":
// The gcc available on OpenBSD armv7 is old/inadequate (for example, lacks // OpenBSD ships with GCC 4.2, which is now quite old.
// __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 defaultclang = true
}
case "plan9": case "plan9":
gohostarch = os.Getenv("objtype") gohostarch = os.Getenv("objtype")
if gohostarch == "" { if gohostarch == "" {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment