Commit 9b70c70f authored by Shenghou Ma's avatar Shenghou Ma Committed by Russ Cox

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
parent a4b2c5ef
......@@ -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
}
......
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