From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- ...05-cmd-go-make-GOROOT-precious-by-default.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch (limited to 'poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch') diff --git a/poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch b/poky/meta/recipes-devtools/go/go-1.9/0005-cmd-go-make-GOROOT-precious-by-default.patch new file mode 100644 index 000000000..6e93bcb6c --- /dev/null +++ b/poky/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 +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 +--- + 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 + -- cgit v1.2.1