diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-05-02 13:53:27 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-05-02 14:02:41 -0400 |
| commit | 79654fc6a1b0767a478b115fba93a2ee914c95a7 (patch) | |
| tree | 249a223288bffc7ca3c34eac575345c753d2f8d6 /recipes-devtools/go-cross/go-1.6/gotooldir.patch | |
| parent | 5dedd395f470c339d19e7b7945b51c08f8182296 (diff) | |
| download | meta-virtualization-79654fc6a1b0767a478b115fba93a2ee914c95a7.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.patch | 26 |
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 @@ | |||
| 1 | Index: 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". | ||
| 14 | Index: 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) | ||
