From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- ...OLDIR-to-be-overridden-in-the-environment.patch | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 external/poky/meta/recipes-devtools/go/go-1.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch (limited to 'external/poky/meta/recipes-devtools/go/go-1.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch') diff --git a/external/poky/meta/recipes-devtools/go/go-1.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch b/external/poky/meta/recipes-devtools/go/go-1.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch new file mode 100644 index 00000000..662c7054 --- /dev/null +++ b/external/poky/meta/recipes-devtools/go/go-1.14/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch @@ -0,0 +1,47 @@ +From 28ada8896b76d620240bafc22aa395071d601482 Mon Sep 17 00:00:00 2001 +From: Alex Kube +Date: Wed, 23 Oct 2019 21:15:37 +0430 +Subject: [PATCH 3/9] cmd/go: Allow GOTOOLDIR to be overridden in the environment + +to allow for split host/target build roots + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison . + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Alexander J Kube +--- + src/cmd/dist/build.go | 4 +++- + src/cmd/go/internal/cfg/cfg.go | 6 +++++- + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/src/cmd/dist/build.go ++++ b/src/cmd/dist/build.go +@@ -246,7 +246,9 @@ func xinit() { + workdir = xworkdir() + xatexit(rmworkdir) + +- tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) ++ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" { ++ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch) ++ } + } + + // compilerEnv returns a map from "goos/goarch" to the +--- a/src/cmd/go/internal/cfg/cfg.go ++++ b/src/cmd/go/internal/cfg/cfg.go +@@ -64,7 +64,11 @@ func defaultContext() build.Context { + // variables. This matches the initialization of ToolDir in + // go/build, except for using ctxt.GOROOT rather than + // runtime.GOROOT. +- build.ToolDir = filepath.Join(ctxt.GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++ if s := os.Getenv("GOTOOLDIR"); s != "" { ++ build.ToolDir = filepath.Clean(s) ++ } else { ++ build.ToolDir = filepath.Join(ctxt.GOROOT, "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++ } + } + + ctxt.GOPATH = envOr("GOPATH", ctxt.GOPATH) -- cgit 1.2.3-korg