From 679004f484f0902b6eb8c66eb40c88f98a1163f1 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 30 May 2018 10:10:08 +0200 Subject: [PATCH] cmd/dist: remove support for macOS 10.9 and earlier Updates #23122 Change-Id: I14cfb83f3f78cdbe5880bd29209388ad12b9ee89 Reviewed-on: https://go-review.googlesource.com/115236 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor Reviewed-by: Brad Fitzpatrick --- src/cmd/dist/main.go | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/cmd/dist/main.go b/src/cmd/dist/main.go index a72a2607f9..37e37e2733 100644 --- a/src/cmd/dist/main.go +++ b/src/cmd/dist/main.go @@ -9,7 +9,6 @@ import ( "fmt" "os" "runtime" - "strconv" "strings" ) @@ -61,6 +60,8 @@ func main() { // Even on 64-bit platform, darwin uname -m prints i386. // We don't support any of the OS X versions that run on 32-bit-only hardware anymore. gohostarch = "amd64" + // macOS 10.9 and later require clang + defaultclang = true case "freebsd": // Since FreeBSD 10 gcc is no longer part of the base system. defaultclang = true @@ -126,29 +127,6 @@ func main() { } bginit() - // The OS X 10.6 linker does not support external linking mode. - // See golang.org/issue/5130. - // - // OS X 10.6 does not work with clang either, but OS X 10.9 requires it. - // It seems to work with OS X 10.8, so we default to clang for 10.8 and later. - // See golang.org/issue/5822. - // - // Roughly, OS X 10.N shows up as uname release (N+4), - // so OS X 10.6 is uname version 10 and OS X 10.8 is uname version 12. - if gohostos == "darwin" { - rel := run("", CheckExit, "uname", "-r") - if i := strings.Index(rel, "."); i >= 0 { - rel = rel[:i] - } - osx, _ := strconv.Atoi(rel) - if osx <= 6+4 { - goextlinkenabled = "0" - } - if osx >= 8+4 { - defaultclang = true - } - } - if len(os.Args) > 1 && os.Args[1] == "-check-goarm" { useVFPv1() // might fail with SIGILL println("VFPv1 OK.")