]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: pass $CGO_LDFLAGS to linker with the "gccgo" toolchain.
authorPeter Collingbourne <pcc@google.com>
Sat, 25 Oct 2014 17:30:14 +0000 (10:30 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 25 Oct 2014 17:30:14 +0000 (10:30 -0700)
LGTM=iant
R=iant, minux
CC=golang-codereviews, golang-dev
https://golang.org/cl/157460043

src/cmd/go/build.go

index 49b84709e2db68adfab9a08d53bc79bf80554768..79a27116a1751e20d5c6ce5156ea2cfbc30a7794 100644 (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")