libgo patch committed: Pass CGO_LDFLAGS to linker for cgo
Ian Lance Taylor
iant@golang.org
Sat Jan 10 01:56:00 GMT 2015
This patch from Peter Collingbourne backports a patch from the master
repository to pass CGO_LDFLAGS to the linker when using cgo with
gccgo. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.
Ian
-------------- next part --------------
diff -r b0a83aacb539 libgo/go/cmd/go/build.go
--- a/libgo/go/cmd/go/build.go Fri Jan 09 13:17:25 2015 -0800
+++ b/libgo/go/cmd/go/build.go Fri Jan 09 16:41:10 2015 -0800
@@ -1895,6 +1895,7 @@
}
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")
More information about the Gcc-patches
mailing list