fix inconsistent install paths between gccgo and go tool

2014-01-21 Thread Michael Hudson-Doyle
Hi,

This patch for the 4.8 branch fixes an inconsistency between gccgo's
libgo and the go tool over where libraries installed with go install
-compiler gccgo end up.  Even if it's not strictly required, it makes
sense to me that as gccgo implements go 1.1 it should match the go tool
from that particular version of the go distribution (and also newer
ones!).

Cheers,
mwh


diff --git a/libgo/go/go/build/build.go b/libgo/go/go/build/build.go
index cc89afb..59ddcef 100644
--- a/libgo/go/go/build/build.go
+++ b/libgo/go/go/build/build.go
@@ -429,7 +429,7 @@ func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Packa
 	switch ctxt.Compiler {
 	case gccgo:
 		dir, elem := pathpkg.Split(p.ImportPath)
-		pkga = pkg/gccgo/ + dir + lib + elem + .a
+		pkga = pkg/gccgo_ + ctxt.GOOS + _ + ctxt.GOARCH + / + dir + lib + elem + .a
 	case gc:
 		suffix := 
 		if ctxt.InstallSuffix !=  {


Re: fix inconsistent install paths between gccgo and go tool

2014-01-21 Thread Ian Lance Taylor
On Tue, Jan 21, 2014 at 3:29 PM, Michael Hudson-Doyle
michael.hud...@linaro.org wrote:

 This patch for the 4.8 branch fixes an inconsistency between gccgo's
 libgo and the go tool over where libraries installed with go install
 -compiler gccgo end up.  Even if it's not strictly required, it makes
 sense to me that as gccgo implements go 1.1 it should match the go tool
 from that particular version of the go distribution (and also newer
 ones!).

This is OK for 4.8 branch.

Thanks.

Ian