cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" toolchain).
From-SVN: r219419
This commit is contained in:
parent
6b3762e4c2
commit
bb782ca3ec
|
@ -1895,6 +1895,7 @@ func (tools gccgoToolchain) ld(b *builder, p *Package, out string, allactions []
|
||||||
}
|
}
|
||||||
ldflags = append(ldflags, afiles...)
|
ldflags = append(ldflags, afiles...)
|
||||||
ldflags = append(ldflags, cgoldflags...)
|
ldflags = append(ldflags, cgoldflags...)
|
||||||
|
ldflags = append(ldflags, envList("CGO_LDFLAGS", "")...)
|
||||||
ldflags = append(ldflags, p.CgoLDFLAGS...)
|
ldflags = append(ldflags, p.CgoLDFLAGS...)
|
||||||
if usesCgo && goos == "linux" {
|
if usesCgo && goos == "linux" {
|
||||||
ldflags = append(ldflags, "-Wl,-E")
|
ldflags = append(ldflags, "-Wl,-E")
|
||||||
|
|
Loading…
Reference in New Issue