cmd/go: pass $CGO_LDFLAGS to linker with the "gccgo" toolchain.

LGTM=iant
R=iant, minux
CC=golang-codereviews, golang-dev
https://golang.org/cl/157460043
This commit is contained in:
Peter Collingbourne 2014-10-25 10:30:14 -07:00 committed by Ian Lance Taylor
parent fdf458436a
commit ffa5e5f7fc
1 changed files with 1 additions and 0 deletions

View File

@ -1945,6 +1945,7 @@ func (tools gccgoToolchain) ld(b *builder, p *Package, out string, allactions []
}
ldflags = append(ldflags, afiles...)
ldflags = append(ldflags, cgoldflags...)
ldflags = append(ldflags, envList("CGO_LDFLAGS", "")...)
ldflags = append(ldflags, p.CgoLDFLAGS...)
if usesCgo && goos == "linux" {
ldflags = append(ldflags, "-Wl,-E")