]> Cypherpunks repositories - gostls13.git/commit
cmd/go: When linking with gccgo pass .a files in the order they are discovered
authorMichael Hudson-Doyle <michael.hudson@linaro.org>
Tue, 28 Jan 2014 05:47:09 +0000 (16:47 +1100)
committerDave Cheney <dave@cheney.net>
Tue, 28 Jan 2014 05:47:09 +0000 (16:47 +1100)
commit9f8f0a1bfa49b6b617c623f51b9d10ba9a5e4641
tree4ca00cb25270a60aae354f4cc0fcf67ba0b42379
parent610dc92eac5ac3cb4d626982e954f37843573042
cmd/go: When linking with gccgo pass .a files in the order they are discovered

Under some circumstances linking a test binary with gccgo can fail, because
the installed version of the library ends up before the version built for the
test on the linker command line.

This admittedly slightly hackish fix fixes this by putting the library archives
on the linker command line in the order that a pre-order depth first traversal
of the dependencies gives them, which has the side effect of always putting the
version of the library built for the test first.

Fixes #6768

LGTM=rsc
R=golang-codereviews, minux.ma, gobot, rsc, dave
CC=golang-codereviews
https://golang.org/cl/28050043
src/cmd/go/build.go