diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-07 22:40:22 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-10 15:51:55 +0000 |
commit | 760e81678cec80dcdaab12c2a0a0148e3e0ba275 (patch) | |
tree | 6b587a2e9bd13c68788c1ff20df54db7e2f38c53 /meta/recipes-devtools/go/go-1.7/gotooldir.patch | |
parent | 0efe58df2e5389f86dfbd53f90afc8f2970def7d (diff) | |
download | poky-760e81678cec80dcdaab12c2a0a0148e3e0ba275.tar.gz |
go: Add recipes for golang compilers and tools
* This is converging the recipes for go from
meta-virtualization and oe-meta-go
* Add recipes for go 1.7
* go.bbclass is added to ease out writing
recipes for go packages
* go-examples: Add an example, helloworld written in go
This should serve as temlate for writing go recipes
* Disable for musl, at least for now
* Disable for x32/ppc32 which is not supported
(From OE-Core rev: 78615e9260fb5d6569de4883521b049717fa4340)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go/go-1.7/gotooldir.patch')
-rw-r--r-- | meta/recipes-devtools/go/go-1.7/gotooldir.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.7/gotooldir.patch b/meta/recipes-devtools/go/go-1.7/gotooldir.patch new file mode 100644 index 0000000000..94670259f2 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.7/gotooldir.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Define tooldir in relation to GOTOOLDIR env var | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | Upstream-Status: Pending | ||
5 | Index: go/src/go/build/build.go | ||
6 | =================================================================== | ||
7 | --- go.orig/src/go/build/build.go | ||
8 | +++ go/src/go/build/build.go | ||
9 | @@ -1388,7 +1388,7 @@ func init() { | ||
10 | } | ||
11 | |||
12 | // ToolDir is the directory containing build tools. | ||
13 | -var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) | ||
14 | +var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) | ||
15 | |||
16 | // IsLocalImport reports whether the import path is | ||
17 | // a local import path, like ".", "..", "./foo", or "../foo". | ||
18 | Index: go/src/cmd/go/build.go | ||
19 | =================================================================== | ||
20 | --- go.orig/src/cmd/go/build.go | ||
21 | +++ go/src/cmd/go/build.go | ||
22 | @@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err | ||
23 | } | ||
24 | |||
25 | cgoExe := tool("cgo") | ||
26 | - if a.cgo != nil && a.cgo.target != "" { | ||
27 | + if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { | ||
28 | cgoExe = a.cgo.target | ||
29 | } | ||
30 | outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) | ||