aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-1.8/make-goroot-precious.patch
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2017-09-12 09:50:21 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-12 23:51:37 +0100
commitd2a7af7cd834e218c39d43ee3fa0c14d4f748727 (patch)
treedcf3007032b00a663a84e1259eac7693e2559184 /meta/recipes-devtools/go/go-1.8/make-goroot-precious.patch
parentd9f54865ac90ed8d39a70b7989b1bf43ab26e248 (diff)
downloadopenembedded-core-contrib-d2a7af7cd834e218c39d43ee3fa0c14d4f748727.tar.gz
go: split out go-runtime into separate recipe
Reorganize the Go toolchain build to split out the Go standard runtime libraries into a separate recipe. This simplifies the extension to crosssdk and cross-canadian builds. * Adds a patch to the go build tool to prevent it from trying to rebuild anything in GOROOT, which is now resident in the target sysroot. * 'go' bb and inc files are now for building the compiler for the target only. * 'go-cross' bb and inc files are now just for the cross-compiler. * Adds virtual/<prefix> PROVIDES for the compiler and runtime * Removes testdata directories from the sysroot during staging, as they are unnecessary and can cause strip errors (some of the test files are ELF files). * Re-enables pacakage QA checks, adding selective INSANE_SKIP settings where needed. 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.8/make-goroot-precious.patch')
-rw-r--r--meta/recipes-devtools/go/go-1.8/make-goroot-precious.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.8/make-goroot-precious.patch b/meta/recipes-devtools/go/go-1.8/make-goroot-precious.patch
new file mode 100644
index 0000000000..28a7a34773
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.8/make-goroot-precious.patch
@@ -0,0 +1,21 @@
+Prevent GOROOT-resident packages from being rebuilt
+
+Signed-off-by: Matt Madison <matt@madison.systems>
+Upstream-Status: Pending
+
+--- go.orig/src/cmd/go/pkg.go
++++ go/src/cmd/go/pkg.go
+@@ -1496,6 +1496,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.deps {
+ if p1.Stale {