From: Ian Lance Taylor Date: Sat, 10 Jan 2015 01:01:10 +0000 (+0000) Subject: cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" toolchain). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb782ca3ec1adb8b273f52d28c2ce54185acaaca;p=gcc.git cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" toolchain). From-SVN: r219419 --- diff --git a/libgo/go/cmd/go/build.go b/libgo/go/cmd/go/build.go index 36216cea404..cead0faa97d 100644 --- a/libgo/go/cmd/go/build.go +++ b/libgo/go/cmd/go/build.go @@ -1895,6 +1895,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")