summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch')
-rw-r--r--meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch b/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
index 6abd424733..cf7ad02f86 100644
--- a/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
+++ b/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
@@ -1,4 +1,4 @@
1From 5cca2fa5997292a87302bdc7e7ed3231371e98bd Mon Sep 17 00:00:00 2001 1From e3f9a8a69d3a340c1a1d0bba566e71f20f635a43 Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com> 2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:15:37 +0430 3Date: Wed, 23 Oct 2019 21:15:37 +0430
4Subject: [PATCH 2/9] cmd/go: Allow GOTOOLDIR to be overridden in the 4Subject: [PATCH 2/9] cmd/go: Allow GOTOOLDIR to be overridden in the
@@ -13,16 +13,17 @@ Matt Madison <matt@madison.systems>.
13Upstream-Status: Inappropriate [OE specific] 13Upstream-Status: Inappropriate [OE specific]
14 14
15Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> 15Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
16Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
16--- 17---
17 src/cmd/dist/build.go | 4 +++- 18 src/cmd/dist/build.go | 4 +++-
18 src/cmd/go/internal/cfg/cfg.go | 6 +++++- 19 src/cmd/go/internal/cfg/cfg.go | 6 +++++-
19 2 files changed, 8 insertions(+), 2 deletions(-) 20 2 files changed, 8 insertions(+), 2 deletions(-)
20 21
21diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go 22diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
22index c36a12e..5d31718 100644 23index 8973a87..adc9fd2 100644
23--- a/src/cmd/dist/build.go 24--- a/src/cmd/dist/build.go
24+++ b/src/cmd/dist/build.go 25+++ b/src/cmd/dist/build.go
25@@ -264,7 +264,9 @@ func xinit() { 26@@ -259,7 +259,9 @@ func xinit() {
26 } 27 }
27 xatexit(rmworkdir) 28 xatexit(rmworkdir)
28 29
@@ -30,14 +31,14 @@ index c36a12e..5d31718 100644
30+ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" { 31+ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
31+ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) 32+ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
32+ } 33+ }
33 }
34 34
35 // compilerEnv returns a map from "goos/goarch" to the 35 goversion := findgoversion()
36 isRelease = strings.HasPrefix(goversion, "release.") || strings.HasPrefix(goversion, "go")
36diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go 37diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
37index 3257140..bb46253 100644 38index 8a82e55..1141fc2 100644
38--- a/src/cmd/go/internal/cfg/cfg.go 39--- a/src/cmd/go/internal/cfg/cfg.go
39+++ b/src/cmd/go/internal/cfg/cfg.go 40+++ b/src/cmd/go/internal/cfg/cfg.go
40@@ -229,7 +229,11 @@ func SetGOROOT(goroot string, isTestGo bool) { 41@@ -231,7 +231,11 @@ func SetGOROOT(goroot string, isTestGo bool) {
41 // This matches the initialization of ToolDir in go/build, except for 42 // This matches the initialization of ToolDir in go/build, except for
42 // using ctxt.GOROOT and the installed GOOS and GOARCH rather than the 43 // using ctxt.GOROOT and the installed GOOS and GOARCH rather than the
43 // GOROOT, GOOS, and GOARCH reported by the runtime package. 44 // GOROOT, GOOS, and GOARCH reported by the runtime package.
@@ -51,5 +52,5 @@ index 3257140..bb46253 100644
51 } 52 }
52 } 53 }
53-- 54--
542.30.2 552.43.0
55 56