diff options
| author | Zongchun Yu <zongchun.yu@nxp.com> | 2016-04-05 17:54:28 +0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-04-19 15:51:10 -0400 |
| commit | 12c601cd2df52ad123b337647eeb990f46422a25 (patch) | |
| tree | 9fd33cda1e85643fe6baa408ccb67bd0b4c166b4 /recipes-devtools/go-cross/go-1.5/gotooldir.patch | |
| parent | 841dc6f3a2a77bda2a1cd2bb7bcd6f3e709699db (diff) | |
| download | meta-virtualization-12c601cd2df52ad123b337647eeb990f46422a25.tar.gz | |
go-cross: uprev to 1.5.2
* Add go-native as build bootstrap for go-cross.
* Upgrade go-cross to v1.5.2
Signed-off-by: Zongchun Yu <zongchun.yu@nxp.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-devtools/go-cross/go-1.5/gotooldir.patch')
| -rw-r--r-- | recipes-devtools/go-cross/go-1.5/gotooldir.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/recipes-devtools/go-cross/go-1.5/gotooldir.patch b/recipes-devtools/go-cross/go-1.5/gotooldir.patch new file mode 100644 index 00000000..473a3280 --- /dev/null +++ b/recipes-devtools/go-cross/go-1.5/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) | ||
