summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/go-cross/go-1.6/gotooldir.patch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2016-05-02 13:53:27 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-06-14 10:58:41 -0400
commita9a9fc03db86d659ba7da3eccd72540159de6c72 (patch)
tree050592659d50b8c0a45fc81f1272b601a93091fa /recipes-devtools/go-cross/go-1.6/gotooldir.patch
parent38cdaf39bfdbb1369567debc112e91c379f6d792 (diff)
downloadmeta-virtualization-a9a9fc03db86d659ba7da3eccd72540159de6c72.tar.gz
go: add go-cross 1.6
Introduce the 1.6 go release, and port patches to apply to this version. Existing versions (1.5) are not removed, so this is not a forced update. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-devtools/go-cross/go-1.6/gotooldir.patch')
-rw-r--r--recipes-devtools/go-cross/go-1.6/gotooldir.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/recipes-devtools/go-cross/go-1.6/gotooldir.patch b/recipes-devtools/go-cross/go-1.6/gotooldir.patch
new file mode 100644
index 00000000..473a3280
--- /dev/null
+++ b/recipes-devtools/go-cross/go-1.6/gotooldir.patch
@@ -0,0 +1,26 @@
1Index: go/src/go/build/build.go
2===================================================================
3--- go.orig/src/go/build/build.go
4+++ go/src/go/build/build.go
5@@ -1388,7 +1388,7 @@ func init() {
6 }
7
8 // ToolDir is the directory containing build tools.
9-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
10+var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH))
11
12 // IsLocalImport reports whether the import path is
13 // a local import path, like ".", "..", "./foo", or "../foo".
14Index: go/src/cmd/go/build.go
15===================================================================
16--- go.orig/src/cmd/go/build.go
17+++ go/src/cmd/go/build.go
18@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err
19 }
20
21 cgoExe := tool("cgo")
22- if a.cgo != nil && a.cgo.target != "" {
23+ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" {
24 cgoExe = a.cgo.target
25 }
26 outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles)