go/cmd/go: always link external test packages first
commitc820e60152fcba1ca3b2e5b7c46c7cdd012417fe
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Mar 2015 17:54:07 +0000 (31 17:54 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Mar 2015 17:54:07 +0000 (31 17:54 +0000)
treeb792a0058ace05d8001459428e3226493a28fea5
parent70a6bb0ae7f28b63e20d5fcf1f5f4deb9a3fe5d1
go/cmd/go: always link external test packages first

When linking complex packages that use both internal and external tests as well as many dependencies it is critical that the link order be external test package, internal test package, everything else.

This change is a back (forward?) port of the same change that canonical have been maintaining on their fork of the go tool for gccgo. Now that gccgo uses the go tool from upstream, this patch should be applied both to the gofrontend and golang/go repos.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221800 138bc75d-0d04-0410-961f-82ee72b054a4
libgo/go/cmd/go/build.go
libgo/go/cmd/go/pkg.go
libgo/go/cmd/go/test.go