summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2017-09-13 14:54:10 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-14 11:35:46 +0100
commit41c51dc28e881f8a12c62725a4d823db804a5cb1 (patch)
tree247fcae541237ec3afbf2a323442d34f622f0536 /meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch
parente6542356b461b510f913eecd3850c075764acc3a (diff)
downloadpoky-41c51dc28e881f8a12c62725a4d823db804a5cb1.tar.gz
go: update to go 1.9
* Rebased patches - dropped armhf-elf patch, should no longer be needed - dropped syslog patch which should not have been imported to begin with - reworked other patches as needed for the updated code base * Updated native, cross, cross-canadian .inc files to remove some testdata directories that contain .a files that strip chokes on during sysroot staging (From OE-Core rev: f2ccf56778433ec16f44eecaa10a610a6630df50) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch')
-rw-r--r--meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch b/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch
new file mode 100644
index 0000000000..6e93bcb6ce
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch
@@ -0,0 +1,41 @@
1From 44f961975dac6cf464a77b5f6dd0c47cc192c4fd Mon Sep 17 00:00:00 2001
2From: Matt Madison <matt@madison.systems>
3Date: Wed, 13 Sep 2017 08:19:52 -0700
4Subject: [PATCH 5/7] cmd/go: make GOROOT precious by default
5
6For OE builds, we never want packages that have
7already been installed into the build root to be
8modified, so prevent the go build tool from checking
9if they should be rebuilt.
10
11Also add an environment variable to override this
12behavior, just for building the Go runtime.
13
14Upstream-Status: Pending
15
16Signed-off-by: Matt Madison <matt@madison.systems>
17---
18 src/cmd/go/internal/load/pkg.go | 7 +++++++
19 1 file changed, 7 insertions(+)
20
21diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
22index 60de666..2660d3f 100644
23--- a/src/cmd/go/internal/load/pkg.go
24+++ b/src/cmd/go/internal/load/pkg.go
25@@ -1530,6 +1530,13 @@ func isStale(p *Package) (bool, string) {
26 return true, "build ID mismatch"
27 }
28
29+ // For OE builds, make anything in GOROOT non-stale,
30+ // to prevent a package build from overwriting the
31+ // build root.
32+ if p.Goroot && os.Getenv("GOROOT_OVERRIDE") != "1" {
33+ return false, "GOROOT-resident packages do not get rebuilt"
34+ }
35+
36 // Package is stale if a dependency is.
37 for _, p1 := range p.Internal.Deps {
38 if p1.Stale {
39--
402.7.4
41