Skip to content

Commit 679004f

Browse files
tklauserbradfitz
authored andcommitted
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent e023d5b commit 679004f

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

src/cmd/dist/main.go

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"fmt"
1010
"os"
1111
"runtime"
12-
"strconv"
1312
"strings"
1413
)
1514

@@ -61,6 +60,8 @@ func main() {
6160
// Even on 64-bit platform, darwin uname -m prints i386.
6261
// We don't support any of the OS X versions that run on 32-bit-only hardware anymore.
6362
gohostarch = "amd64"
63+
// macOS 10.9 and later require clang
64+
defaultclang = true
6465
case "freebsd":
6566
// Since FreeBSD 10 gcc is no longer part of the base system.
6667
defaultclang = true
@@ -126,29 +127,6 @@ func main() {
126127
}
127128
bginit()
128129

129-
// The OS X 10.6 linker does not support external linking mode.
130-
// See golang.org/issue/5130.
131-
//
132-
// OS X 10.6 does not work with clang either, but OS X 10.9 requires it.
133-
// It seems to work with OS X 10.8, so we default to clang for 10.8 and later.
134-
// See golang.org/issue/5822.
135-
//
136-
// Roughly, OS X 10.N shows up as uname release (N+4),
137-
// so OS X 10.6 is uname version 10 and OS X 10.8 is uname version 12.
138-
if gohostos == "darwin" {
139-
rel := run("", CheckExit, "uname", "-r")
140-
if i := strings.Index(rel, "."); i >= 0 {
141-
rel = rel[:i]
142-
}
143-
osx, _ := strconv.Atoi(rel)
144-
if osx <= 6+4 {
145-
goextlinkenabled = "0"
146-
}
147-
if osx >= 8+4 {
148-
defaultclang = true
149-
}
150-
}
151-
152130
if len(os.Args) > 1 && os.Args[1] == "-check-goarm" {
153131
useVFPv1() // might fail with SIGILL
154132
println("VFPv1 OK.")

0 commit comments

Comments
 (0)