From bb782ca3ec1adb8b273f52d28c2ce54185acaaca Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 10 Jan 2015 01:01:10 +0000 Subject: [PATCH] cmd/go: Back-port CL 157460043 (pass $CGO_LDFLAGS to linker with the "gccgo" toolchain). From-SVN: r219419 --- libgo/go/cmd/go/build.go | 1 + 1 file changed, 1 insertion(+) 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") -- 2.30.2