mirror of https://github.com/golang/go.git
cmd/go: add -fno-common by default on Darwin
Fixes part of issue 3253.
We still need to support scattered relocations though.
R=golang-dev, bsiegert, rsc, iant
CC=golang-dev
https://golang.org/cl/5822050
This commit is contained in:
parent
a4b2c5efbc
commit
9b70c70ffb
|
|
@ -1403,6 +1403,14 @@ func (b *builder) gccCmd(objdir string) []string {
|
|||
a = append(a, "-pthread")
|
||||
}
|
||||
}
|
||||
|
||||
// On OS X, some of the compilers behave as if -fno-common
|
||||
// is always set, and the Mach-O linker in 6l/8l assumes this.
|
||||
// See http://golang.org/issue/3253.
|
||||
if goos == "darwin" {
|
||||
a = append(a, "-fno-common")
|
||||
}
|
||||
|
||||
return a
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue