Commit bb782ca3 by Ian Lance Taylor

cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" toolchain).

From-SVN: r219419
parent 6b3762e4
...@@ -1895,6 +1895,7 @@ func (tools gccgoToolchain) ld(b *builder, p *Package, out string, allactions [] ...@@ -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")
......
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