summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/go
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/go')
-rw-r--r--poky/meta/recipes-devtools/go/go-1.18.3.inc (renamed from poky/meta/recipes-devtools/go/go-1.18.2.inc)3
-rw-r--r--poky/meta/recipes-devtools/go/go-binary-native_1.18.3.bb (renamed from poky/meta/recipes-devtools/go/go-binary-native_1.18.2.bb)4
-rw-r--r--poky/meta/recipes-devtools/go/go-cross-canadian_1.18.3.bb (renamed from poky/meta/recipes-devtools/go/go-cross-canadian_1.18.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-cross_1.18.3.bb (renamed from poky/meta/recipes-devtools/go/go-cross_1.18.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-crosssdk_1.18.3.bb (renamed from poky/meta/recipes-devtools/go/go-crosssdk_1.18.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-native_1.18.3.bb (renamed from poky/meta/recipes-devtools/go/go-native_1.18.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go-runtime_1.18.3.bb (renamed from poky/meta/recipes-devtools/go/go-runtime_1.18.2.bb)0
-rw-r--r--poky/meta/recipes-devtools/go/go/filter-build-paths.patch48
-rw-r--r--poky/meta/recipes-devtools/go/go_1.18.3.bb (renamed from poky/meta/recipes-devtools/go/go_1.18.2.bb)0
9 files changed, 52 insertions, 3 deletions
diff --git a/poky/meta/recipes-devtools/go/go-1.18.2.inc b/poky/meta/recipes-devtools/go/go-1.18.3.inc
index 8f4f47db9e..693b045e8f 100644
--- a/poky/meta/recipes-devtools/go/go-1.18.2.inc
+++ b/poky/meta/recipes-devtools/go/go-1.18.3.inc
@@ -13,5 +13,6 @@ SRC_URI += "\
file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
file://0001-exec.go-do-not-write-linker-flags-into-buildids.patch \
file://0001-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
+ file://filter-build-paths.patch \
"
-SRC_URI[main.sha256sum] = "2c44d03ea2c34092137ab919ba602f2c261a038d08eb468528a3f3a28e5667e2"
+SRC_URI[main.sha256sum] = "0012386ddcbb5f3350e407c679923811dbd283fcdc421724931614a842ecbc2d"
diff --git a/poky/meta/recipes-devtools/go/go-binary-native_1.18.2.bb b/poky/meta/recipes-devtools/go/go-binary-native_1.18.3.bb
index c5514c5fdf..f207a47e90 100644
--- a/poky/meta/recipes-devtools/go/go-binary-native_1.18.2.bb
+++ b/poky/meta/recipes-devtools/go/go-binary-native_1.18.3.bb
@@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
PROVIDES = "go-native"
SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
-SRC_URI[go_linux_amd64.sha256sum] = "e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc"
-SRC_URI[go_linux_arm64.sha256sum] = "fc4ad28d0501eaa9c9d6190de3888c9d44d8b5fb02183ce4ae93713f67b8a35b"
+SRC_URI[go_linux_amd64.sha256sum] = "956f8507b302ab0bb747613695cdae10af99bbd39a90cae522b7c0302cc27245"
+SRC_URI[go_linux_arm64.sha256sum] = "beacbe1441bee4d7978b900136d1d6a71d150f0a9bb77e9d50c822065623a35a"
UPSTREAM_CHECK_URI = "https://golang.org/dl/"
UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/poky/meta/recipes-devtools/go/go-cross-canadian_1.18.2.bb b/poky/meta/recipes-devtools/go/go-cross-canadian_1.18.3.bb
index 7ac9449e47..7ac9449e47 100644
--- a/poky/meta/recipes-devtools/go/go-cross-canadian_1.18.2.bb
+++ b/poky/meta/recipes-devtools/go/go-cross-canadian_1.18.3.bb
diff --git a/poky/meta/recipes-devtools/go/go-cross_1.18.2.bb b/poky/meta/recipes-devtools/go/go-cross_1.18.3.bb
index 80b5a03f6c..80b5a03f6c 100644
--- a/poky/meta/recipes-devtools/go/go-cross_1.18.2.bb
+++ b/poky/meta/recipes-devtools/go/go-cross_1.18.3.bb
diff --git a/poky/meta/recipes-devtools/go/go-crosssdk_1.18.2.bb b/poky/meta/recipes-devtools/go/go-crosssdk_1.18.3.bb
index 1857c8a577..1857c8a577 100644
--- a/poky/meta/recipes-devtools/go/go-crosssdk_1.18.2.bb
+++ b/poky/meta/recipes-devtools/go/go-crosssdk_1.18.3.bb
diff --git a/poky/meta/recipes-devtools/go/go-native_1.18.2.bb b/poky/meta/recipes-devtools/go/go-native_1.18.3.bb
index 76c0ab73a6..76c0ab73a6 100644
--- a/poky/meta/recipes-devtools/go/go-native_1.18.2.bb
+++ b/poky/meta/recipes-devtools/go/go-native_1.18.3.bb
diff --git a/poky/meta/recipes-devtools/go/go-runtime_1.18.2.bb b/poky/meta/recipes-devtools/go/go-runtime_1.18.3.bb
index 63464a1501..63464a1501 100644
--- a/poky/meta/recipes-devtools/go/go-runtime_1.18.2.bb
+++ b/poky/meta/recipes-devtools/go/go-runtime_1.18.3.bb
diff --git a/poky/meta/recipes-devtools/go/go/filter-build-paths.patch b/poky/meta/recipes-devtools/go/go/filter-build-paths.patch
new file mode 100644
index 0000000000..caf727714e
--- /dev/null
+++ b/poky/meta/recipes-devtools/go/go/filter-build-paths.patch
@@ -0,0 +1,48 @@
+Filter out build time paths from ldflags and other flags variables when they're
+embedded in the go binary so that builds are reproducible regardless of build
+location. This codepath is hit for statically linked go binaries such as those
+on mips/ppc.
+
+Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: go/src/cmd/go/internal/load/pkg.go
+===================================================================
+--- go.orig/src/cmd/go/internal/load/pkg.go
++++ go/src/cmd/go/internal/load/pkg.go
+@@ -2225,6 +2225,17 @@ func (p *Package) collectDeps() {
+ // to their VCS information (vcsStatusError).
+ var vcsStatusCache par.Cache
+
++func filterCompilerFlags(flags string) string {
++ var newflags []string
++ for _, flag := range strings.Fields(flags) {
++ if strings.HasPrefix(flag, "--sysroot") || strings.HasPrefix(flag, "-fmacro-prefix-map") || strings.HasPrefix(flag, "-fdebug-prefix-map") {
++ continue
++ }
++ newflags = append(newflags, flag)
++ }
++ return strings.Join(newflags, " ")
++}
++
+ // setBuildInfo gathers build information, formats it as a string to be
+ // embedded in the binary, then sets p.Internal.BuildInfo to that string.
+ // setBuildInfo should only be called on a main package with no errors.
+@@ -2329,7 +2340,7 @@ func (p *Package) setBuildInfo(includeVC
+ appendSetting("-gcflags", BuildGcflags.String())
+ }
+ if BuildLdflags.present {
+- appendSetting("-ldflags", BuildLdflags.String())
++ appendSetting("-ldflags", filterCompilerFlags(BuildLdflags.String()))
+ }
+ if cfg.BuildMSan {
+ appendSetting("-msan", "true")
+@@ -2347,7 +2358,7 @@ func (p *Package) setBuildInfo(includeVC
+ appendSetting("CGO_ENABLED", cgo)
+ if cfg.BuildContext.CgoEnabled {
+ for _, name := range []string{"CGO_CFLAGS", "CGO_CPPFLAGS", "CGO_CXXFLAGS", "CGO_LDFLAGS"} {
+- appendSetting(name, cfg.Getenv(name))
++ appendSetting(name, filterCompilerFlags(cfg.Getenv(name)))
+ }
+ }
+ appendSetting("GOARCH", cfg.BuildContext.GOARCH)
diff --git a/poky/meta/recipes-devtools/go/go_1.18.2.bb b/poky/meta/recipes-devtools/go/go_1.18.3.bb
index 98977673ee..98977673ee 100644
--- a/poky/meta/recipes-devtools/go/go_1.18.2.bb
+++ b/poky/meta/recipes-devtools/go/go_1.18.3.bb