diff options
author | Matt Madison <matt@madison.systems> | 2017-09-13 14:54:10 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-13 22:12:19 +0100 |
commit | f2ccf56778433ec16f44eecaa10a610a6630df50 (patch) | |
tree | 69fd38db1f610b8ae135f00a579b42082c9ae754 /meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch | |
parent | 24da8c321831dcc5de00d65d6c5613efee109b57 (diff) | |
download | openembedded-core-f2ccf56778433ec16f44eecaa10a610a6630df50.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
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.patch | 41 |
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 @@ +From 44f961975dac6cf464a77b5f6dd0c47cc192c4fd Mon Sep 17 00:00:00 2001 +From: Matt Madison <matt@madison.systems> +Date: Wed, 13 Sep 2017 08:19:52 -0700 +Subject: [PATCH 5/7] cmd/go: make GOROOT precious by default + +For OE builds, we never want packages that have +already been installed into the build root to be +modified, so prevent the go build tool from checking +if they should be rebuilt. + +Also add an environment variable to override this +behavior, just for building the Go runtime. + +Upstream-Status: Pending + +Signed-off-by: Matt Madison <matt@madison.systems> +--- + src/cmd/go/internal/load/pkg.go | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go +index 60de666..2660d3f 100644 +--- a/src/cmd/go/internal/load/pkg.go ++++ b/src/cmd/go/internal/load/pkg.go +@@ -1530,6 +1530,13 @@ func isStale(p *Package) (bool, string) { + return true, "build ID mismatch" + } + ++ // For OE builds, make anything in GOROOT non-stale, ++ // to prevent a package build from overwriting the ++ // build root. ++ if p.Goroot && os.Getenv("GOROOT_OVERRIDE") != "1" { ++ return false, "GOROOT-resident packages do not get rebuilt" ++ } ++ + // Package is stale if a dependency is. + for _, p1 := range p.Internal.Deps { + if p1.Stale { +-- +2.7.4 + |