diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-10-18 18:31:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-20 22:40:16 +0100 |
commit | faae1a1e8847ff17ca140705d8bad42b0dad3040 (patch) | |
tree | 711393eae9790a2806b97b6d2803a48aa293706f /meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch | |
parent | 4ad151a53ddb5fdce56d5c8185a49d3433788b2c (diff) | |
download | poky-faae1a1e8847ff17ca140705d8bad42b0dad3040.tar.gz |
go: Upgrade to 1.11.1
Drop 1.10 recipes in favor of 1.11
we have had reports of 1.10 not being quite
functional wth OE
(From OE-Core rev: 1cf3aee0ba0fb0c2e8b82f403384a1928a9b03f4)
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.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch')
-rw-r--r-- | meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch new file mode 100644 index 0000000000..b6ca40edee --- /dev/null +++ b/meta/recipes-devtools/go/go-1.11/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 5c32c38bf19b24f0aadd78012d17ff5caa82151e Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Madison <matt@madison.systems> | ||
3 | Date: Sat, 17 Feb 2018 05:24:20 -0800 | ||
4 | Subject: [PATCH] allow GOTOOLDIR to be overridden in the environment | ||
5 | |||
6 | to allow for split host/target build roots | ||
7 | |||
8 | Upstream-Status: Inappropriate [OE specific] | ||
9 | |||
10 | Signed-off-by: Matt Madison <matt@madison.systems> | ||
11 | |||
12 | --- | ||
13 | src/cmd/dist/build.go | 4 +++- | ||
14 | src/cmd/go/internal/cfg/cfg.go | 7 +++++-- | ||
15 | 2 files changed, 8 insertions(+), 3 deletions(-) | ||
16 | |||
17 | Index: go/src/cmd/dist/build.go | ||
18 | =================================================================== | ||
19 | --- go.orig/src/cmd/dist/build.go | ||
20 | +++ go/src/cmd/dist/build.go | ||
21 | @@ -228,7 +228,9 @@ func xinit() { | ||
22 | workdir = xworkdir() | ||
23 | xatexit(rmworkdir) | ||
24 | |||
25 | - tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) | ||
26 | + if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" { | ||
27 | + tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) | ||
28 | + } | ||
29 | } | ||
30 | |||
31 | // compilerEnv returns a map from "goos/goarch" to the | ||
32 | Index: go/src/cmd/go/internal/cfg/cfg.go | ||
33 | =================================================================== | ||
34 | --- go.orig/src/cmd/go/internal/cfg/cfg.go | ||
35 | +++ go/src/cmd/go/internal/cfg/cfg.go | ||
36 | @@ -116,7 +116,11 @@ func init() { | ||
37 | // variables. This matches the initialization of ToolDir in | ||
38 | // go/build, except for using GOROOT rather than | ||
39 | // runtime.GOROOT. | ||
40 | - build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) | ||
41 | + if s := os.Getenv("GOTOOLDIR"); s != "" { | ||
42 | + build.ToolDir = filepath.Clean(s) | ||
43 | + } else { | ||
44 | + build.ToolDir = filepath.Join(GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) | ||
45 | + } | ||
46 | } | ||
47 | } | ||
48 | |||