]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: remove support for macOS 10.9 and earlier
authorTobias Klauser <tklauser@distanz.ch>
Wed, 30 May 2018 08:10:08 +0000 (10:10 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 30 May 2018 13:40:41 +0000 (13:40 +0000)
Updates #23122

Change-Id: I14cfb83f3f78cdbe5880bd29209388ad12b9ee89
Reviewed-on: https://go-review.googlesource.com/115236
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/main.go

index a72a2607f9f5914d4efb35da0f5ff754d51ba04b..37e37e2733566a44433df976954a1f1366c8b9a1 100644 (file)
@@ -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.")