summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2025-03-01 15:55:50 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-03 18:01:29 +0000
commit4674fc9f7cd3fcc0af41a266f4b24c3f18613af7 (patch)
treec06da25ad0d08bc56055f636a7ca6b6aae8d6605
parent2bd54942917d8ed51d85cc291162002eac7bd133 (diff)
downloadpoky-4674fc9f7cd3fcc0af41a266f4b24c3f18613af7.tar.gz
go: upgrade 1.22.12 -> 1.24.0
Refresh patches See [1] for Go 1.24 Release Notes License-Update: update per Google Legal [2] [1] https://go.dev/doc/go1.24 [2] https://github.com/golang/go/commit/760b722c344d312ab62a5c2f94865a869ce0bab9 (From OE-Core rev: fc6625e934d9b098359103c82cdbcd0c7ce6caee) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/go/go-1.24.0.inc (renamed from meta/recipes-devtools/go/go-1.22.12.inc)4
-rw-r--r--meta/recipes-devtools/go/go-binary-native_1.24.0.bb (renamed from meta/recipes-devtools/go/go-binary-native_1.22.12.bb)8
-rw-r--r--meta/recipes-devtools/go/go-cross-canadian_1.24.0.bb (renamed from meta/recipes-devtools/go/go-cross-canadian_1.22.12.bb)0
-rw-r--r--meta/recipes-devtools/go/go-cross_1.24.0.bb (renamed from meta/recipes-devtools/go/go-cross_1.22.12.bb)0
-rw-r--r--meta/recipes-devtools/go/go-crosssdk_1.24.0.bb (renamed from meta/recipes-devtools/go/go-crosssdk_1.22.12.bb)0
-rw-r--r--meta/recipes-devtools/go/go-runtime_1.24.0.bb (renamed from meta/recipes-devtools/go/go-runtime_1.22.12.bb)0
-rw-r--r--meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch39
-rw-r--r--meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch16
-rw-r--r--meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch15
-rw-r--r--meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch33
-rw-r--r--meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch38
-rw-r--r--meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch23
-rw-r--r--meta/recipes-devtools/go/go/0007-exec.go-filter-out-build-specific-paths-from-linker-.patch14
-rw-r--r--meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch11
-rw-r--r--meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch15
-rw-r--r--meta/recipes-devtools/go/go/6d265b008e3d106b2706645e5a88cd8e2fb98953.patch9
-rw-r--r--meta/recipes-devtools/go/go_1.24.0.bb (renamed from meta/recipes-devtools/go/go_1.22.12.bb)0
17 files changed, 135 insertions, 90 deletions
diff --git a/meta/recipes-devtools/go/go-1.22.12.inc b/meta/recipes-devtools/go/go-1.24.0.inc
index 8d14efa1e9..26a4947caf 100644
--- a/meta/recipes-devtools/go/go-1.22.12.inc
+++ b/meta/recipes-devtools/go/go-1.24.0.inc
@@ -2,7 +2,7 @@ require go-common.inc
2 2
3FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go:" 3FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go:"
4 4
5LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=7998cb338f82d15c0eff93b7004d272a"
6 6
7SRC_URI += "\ 7SRC_URI += "\
8 file://0001-cmd-go-make-content-based-hash-generation-less-pedan.patch \ 8 file://0001-cmd-go-make-content-based-hash-generation-less-pedan.patch \
@@ -16,4 +16,4 @@ SRC_URI += "\
16 file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \ 16 file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \
17 file://6d265b008e3d106b2706645e5a88cd8e2fb98953.patch \ 17 file://6d265b008e3d106b2706645e5a88cd8e2fb98953.patch \
18" 18"
19SRC_URI[main.sha256sum] = "012a7e1f37f362c0918c1dfa3334458ac2da1628c4b9cf4d9ca02db986e17d71" 19SRC_URI[main.sha256sum] = "d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5"
diff --git a/meta/recipes-devtools/go/go-binary-native_1.22.12.bb b/meta/recipes-devtools/go/go-binary-native_1.24.0.bb
index 747737ff94..d9eebb9c37 100644
--- a/meta/recipes-devtools/go/go-binary-native_1.22.12.bb
+++ b/meta/recipes-devtools/go/go-binary-native_1.24.0.bb
@@ -3,15 +3,15 @@
3SUMMARY = "Go programming language compiler (upstream binary for bootstrap)" 3SUMMARY = "Go programming language compiler (upstream binary for bootstrap)"
4HOMEPAGE = " http://golang.org/" 4HOMEPAGE = " http://golang.org/"
5LICENSE = "BSD-3-Clause" 5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=7998cb338f82d15c0eff93b7004d272a"
7 7
8PROVIDES = "go-native" 8PROVIDES = "go-native"
9 9
10# Checksums available at https://go.dev/dl/ 10# Checksums available at https://go.dev/dl/
11SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}" 11SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
12SRC_URI[go_linux_amd64.sha256sum] = "4fa4f869b0f7fc6bb1eb2660e74657fbf04cdd290b5aef905585c86051b34d43" 12SRC_URI[go_linux_amd64.sha256sum] = "dea9ca38a0b852a74e81c26134671af7c0fbe65d81b0dc1c5bfe22cf7d4c8858"
13SRC_URI[go_linux_arm64.sha256sum] = "fd017e647ec28525e86ae8203236e0653242722a7436929b1f775744e26278e7" 13SRC_URI[go_linux_arm64.sha256sum] = "c3fa6d16ffa261091a5617145553c71d21435ce547e44cc6dfb7470865527cc7"
14SRC_URI[go_linux_ppc64le.sha256sum] = "9573d30003b0796717a99d9e2e96c48fddd4fc0f29d840f212c503b03d7de112" 14SRC_URI[go_linux_ppc64le.sha256sum] = "a871a43de7d26c91dd90cb6e0adacb214c9e35ee2188c617c91c08c017efe81a"
15 15
16UPSTREAM_CHECK_URI = "https://golang.org/dl/" 16UPSTREAM_CHECK_URI = "https://golang.org/dl/"
17UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux" 17UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.22.12.bb b/meta/recipes-devtools/go/go-cross-canadian_1.24.0.bb
index 7ac9449e47..7ac9449e47 100644
--- a/meta/recipes-devtools/go/go-cross-canadian_1.22.12.bb
+++ b/meta/recipes-devtools/go/go-cross-canadian_1.24.0.bb
diff --git a/meta/recipes-devtools/go/go-cross_1.22.12.bb b/meta/recipes-devtools/go/go-cross_1.24.0.bb
index 80b5a03f6c..80b5a03f6c 100644
--- a/meta/recipes-devtools/go/go-cross_1.22.12.bb
+++ b/meta/recipes-devtools/go/go-cross_1.24.0.bb
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.22.12.bb b/meta/recipes-devtools/go/go-crosssdk_1.24.0.bb
index 1857c8a577..1857c8a577 100644
--- a/meta/recipes-devtools/go/go-crosssdk_1.22.12.bb
+++ b/meta/recipes-devtools/go/go-crosssdk_1.24.0.bb
diff --git a/meta/recipes-devtools/go/go-runtime_1.22.12.bb b/meta/recipes-devtools/go/go-runtime_1.24.0.bb
index 63464a1501..63464a1501 100644
--- a/meta/recipes-devtools/go/go-runtime_1.22.12.bb
+++ b/meta/recipes-devtools/go/go-runtime_1.24.0.bb
diff --git a/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch b/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
index a8e5d6e86d..86e941b970 100644
--- a/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
+++ b/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -1,7 +1,8 @@
1From 9b3ebef0356594a447906f00fe80584952c08289 Mon Sep 17 00:00:00 2001 1From 51c04a9a19dec5a48fa0f38324dc2480b7a859e4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 28 Mar 2022 10:59:03 -0700 3Date: Sat, 22 Feb 2025 03:24:48 -0800
4Subject: [PATCH] cmd/go: make content-based hash generation less pedantic 4Subject: [PATCH 01/11] cmd/go: make content-based hash generation less
5 pedantic
5 6
6Go 1.10's build tool now uses content-based hashes to 7Go 1.10's build tool now uses content-based hashes to
7determine when something should be built or re-built. 8determine when something should be built or re-built.
@@ -26,16 +27,19 @@ Signed-off-by: Alex Kube <alexander.j.kube@gmail.com>
26Signed-off-by: Matt Madison <matt@madison.systems> 27Signed-off-by: Matt Madison <matt@madison.systems>
27Signed-off-by: Khem Raj <raj.khem@gmail.com> 28Signed-off-by: Khem Raj <raj.khem@gmail.com>
28Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> 29Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
30
31Rebase to 1.23.4
32Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
29--- 33---
30 src/cmd/go/internal/envcmd/env.go | 2 +- 34 src/cmd/go/internal/envcmd/env.go | 2 +-
31 src/cmd/go/internal/work/exec.go | 44 ++++++++++++++++++++++++------- 35 src/cmd/go/internal/work/exec.go | 44 ++++++++++++++++++++++++-------
32 2 files changed, 36 insertions(+), 10 deletions(-) 36 2 files changed, 36 insertions(+), 10 deletions(-)
33 37
34diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go 38diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
35index c7c2e83..4a90d9d 100644 39index 7c370d427f..c2441f7695 100644
36--- a/src/cmd/go/internal/envcmd/env.go 40--- a/src/cmd/go/internal/envcmd/env.go
37+++ b/src/cmd/go/internal/envcmd/env.go 41+++ b/src/cmd/go/internal/envcmd/env.go
38@@ -189,7 +189,7 @@ func ExtraEnvVarsCostly() []cfg.EnvVar { 42@@ -219,7 +219,7 @@ func ExtraEnvVarsCostly() []cfg.EnvVar {
39 } 43 }
40 }() 44 }()
41 45
@@ -45,10 +49,10 @@ index c7c2e83..4a90d9d 100644
45 // Should not happen - b.CFlags was given an empty package. 49 // Should not happen - b.CFlags was given an empty package.
46 fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err) 50 fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
47diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go 51diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
48index e05471b..9724cd0 100644 52index 7b073165d5..1f618be0bb 100644
49--- a/src/cmd/go/internal/work/exec.go 53--- a/src/cmd/go/internal/work/exec.go
50+++ b/src/cmd/go/internal/work/exec.go 54+++ b/src/cmd/go/internal/work/exec.go
51@@ -232,6 +232,8 @@ func (b *Builder) Do(ctx context.Context, root *Action) { 55@@ -237,6 +237,8 @@ func (b *Builder) Do(ctx context.Context, root *Action) {
52 writeActionGraph() 56 writeActionGraph()
53 } 57 }
54 58
@@ -57,7 +61,7 @@ index e05471b..9724cd0 100644
57 // buildActionID computes the action ID for a build action. 61 // buildActionID computes the action ID for a build action.
58 func (b *Builder) buildActionID(a *Action) cache.ActionID { 62 func (b *Builder) buildActionID(a *Action) cache.ActionID {
59 p := a.Package 63 p := a.Package
60@@ -253,7 +255,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID { 64@@ -258,7 +260,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
61 if p.Module != nil { 65 if p.Module != nil {
62 fmt.Fprintf(h, "module %s@%s\n", p.Module.Path, p.Module.Version) 66 fmt.Fprintf(h, "module %s@%s\n", p.Module.Path, p.Module.Version)
63 } 67 }
@@ -66,7 +70,7 @@ index e05471b..9724cd0 100644
66 // The Go compiler always hides the exact value of $GOROOT 70 // The Go compiler always hides the exact value of $GOROOT
67 // when building things in GOROOT. 71 // when building things in GOROOT.
68 // 72 //
69@@ -285,9 +287,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID { 73@@ -293,9 +295,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
70 } 74 }
71 if len(p.CgoFiles)+len(p.SwigFiles)+len(p.SwigCXXFiles) > 0 { 75 if len(p.CgoFiles)+len(p.SwigFiles)+len(p.SwigCXXFiles) > 0 {
72 fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo")) 76 fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
@@ -78,7 +82,7 @@ index e05471b..9724cd0 100644
78 fmt.Fprintf(h, "CC=%q %q %q %q\n", ccExe, cppflags, cflags, ldflags) 82 fmt.Fprintf(h, "CC=%q %q %q %q\n", ccExe, cppflags, cflags, ldflags)
79 // Include the C compiler tool ID so that if the C 83 // Include the C compiler tool ID so that if the C
80 // compiler changes we rebuild the package. 84 // compiler changes we rebuild the package.
81@@ -295,14 +297,14 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID { 85@@ -303,14 +305,14 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
82 fmt.Fprintf(h, "CC ID=%q\n", ccID) 86 fmt.Fprintf(h, "CC ID=%q\n", ccID)
83 } 87 }
84 if len(p.CXXFiles)+len(p.SwigCXXFiles) > 0 { 88 if len(p.CXXFiles)+len(p.SwigCXXFiles) > 0 {
@@ -95,7 +99,7 @@ index e05471b..9724cd0 100644
95 fmt.Fprintf(h, "FC=%q %q\n", fcExe, fflags) 99 fmt.Fprintf(h, "FC=%q %q\n", fcExe, fflags)
96 if fcID, _, err := b.gccToolID(fcExe[0], "f95"); err == nil { 100 if fcID, _, err := b.gccToolID(fcExe[0], "f95"); err == nil {
97 fmt.Fprintf(h, "FC ID=%q\n", fcID) 101 fmt.Fprintf(h, "FC ID=%q\n", fcID)
98@@ -319,7 +321,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID { 102@@ -327,7 +329,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
99 } 103 }
100 } 104 }
101 if p.Internal.BuildInfo != nil { 105 if p.Internal.BuildInfo != nil {
@@ -104,7 +108,7 @@ index e05471b..9724cd0 100644
104 } 108 }
105 109
106 // Configuration specific to compiler toolchain. 110 // Configuration specific to compiler toolchain.
107@@ -2679,8 +2681,25 @@ func envList(key, def string) []string { 111@@ -2659,8 +2661,25 @@ func envList(key, def string) []string {
108 return args 112 return args
109 } 113 }
110 114
@@ -131,8 +135,8 @@ index e05471b..9724cd0 100644
131 if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil { 135 if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
132 return 136 return
133 } 137 }
134@@ -2696,6 +2715,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l 138@@ -2676,6 +2695,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
135 if ldflags, err = buildFlags("LDFLAGS", defaultCFlags, p.CgoLDFLAGS, checkLinkerFlags); err != nil { 139 if ldflags, err = buildFlags("LDFLAGS", DefaultCFlags, p.CgoLDFLAGS, checkLinkerFlags); err != nil {
136 return 140 return
137 } 141 }
138+ if filtered { 142+ if filtered {
@@ -145,7 +149,7 @@ index e05471b..9724cd0 100644
145 149
146 return 150 return
147 } 151 }
148@@ -2713,7 +2739,7 @@ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgo 152@@ -2693,7 +2719,7 @@ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgo
149 p := a.Package 153 p := a.Package
150 sh := b.Shell(a) 154 sh := b.Shell(a)
151 155
@@ -154,7 +158,7 @@ index e05471b..9724cd0 100644
154 if err != nil { 158 if err != nil {
155 return nil, nil, err 159 return nil, nil, err
156 } 160 }
157@@ -3268,7 +3294,7 @@ func (b *Builder) swigOne(a *Action, file, objdir string, pcCFLAGS []string, cxx 161@@ -3256,7 +3282,7 @@ func (b *Builder) swigOne(a *Action, file, objdir string, pcCFLAGS []string, cxx
158 p := a.Package 162 p := a.Package
159 sh := b.Shell(a) 163 sh := b.Shell(a)
160 164
@@ -163,3 +167,6 @@ index e05471b..9724cd0 100644
163 if err != nil { 167 if err != nil {
164 return "", "", err 168 return "", "", err
165 } 169 }
170--
1712.25.1
172
diff --git a/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch b/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
index a69ada47b0..7e86d8cd6b 100644
--- a/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
+++ b/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
@@ -1,7 +1,8 @@
1From 687ff9d17f756145f9a58413070cccbd488d1ea2 Mon Sep 17 00:00:00 2001 1From fdad9a0ea659cf2281a0df16b0f69f179605ec9a Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com> 2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:15:37 +0430 3Date: Wed, 23 Oct 2019 21:15:37 +0430
4Subject: [PATCH] cmd/go: Allow GOTOOLDIR to be overridden in the environment 4Subject: [PATCH 02/11] cmd/go: Allow GOTOOLDIR to be overridden in the
5 environment
5 6
6to allow for split host/target build roots 7to allow for split host/target build roots
7 8
@@ -19,10 +20,10 @@ Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
19 2 files changed, 8 insertions(+), 2 deletions(-) 20 2 files changed, 8 insertions(+), 2 deletions(-)
20 21
21diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go 22diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
22index 32e59b4..06ee4de 100644 23index 1f467647f5..b62e518030 100644
23--- a/src/cmd/dist/build.go 24--- a/src/cmd/dist/build.go
24+++ b/src/cmd/dist/build.go 25+++ b/src/cmd/dist/build.go
25@@ -259,7 +259,9 @@ func xinit() { 26@@ -280,7 +280,9 @@ func xinit() {
26 } 27 }
27 xatexit(rmworkdir) 28 xatexit(rmworkdir)
28 29
@@ -34,10 +35,10 @@ index 32e59b4..06ee4de 100644
34 goversion := findgoversion() 35 goversion := findgoversion()
35 isRelease = strings.HasPrefix(goversion, "release.") || strings.HasPrefix(goversion, "go") 36 isRelease = strings.HasPrefix(goversion, "release.") || strings.HasPrefix(goversion, "go")
36diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go 37diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
37index a8daa2d..393ada3 100644 38index 3b9f27e91d..ec043c1530 100644
38--- a/src/cmd/go/internal/cfg/cfg.go 39--- a/src/cmd/go/internal/cfg/cfg.go
39+++ b/src/cmd/go/internal/cfg/cfg.go 40+++ b/src/cmd/go/internal/cfg/cfg.go
40@@ -230,7 +230,11 @@ func SetGOROOT(goroot string, isTestGo bool) { 41@@ -248,7 +248,11 @@ func SetGOROOT(goroot string, isTestGo bool) {
41 // This matches the initialization of ToolDir in go/build, except for 42 // This matches the initialization of ToolDir in go/build, except for
42 // using ctxt.GOROOT and the installed GOOS and GOARCH rather than the 43 // using ctxt.GOROOT and the installed GOOS and GOARCH rather than the
43 // GOROOT, GOOS, and GOARCH reported by the runtime package. 44 // GOROOT, GOOS, and GOARCH reported by the runtime package.
@@ -50,3 +51,6 @@ index a8daa2d..393ada3 100644
50 } 51 }
51 } 52 }
52 } 53 }
54--
552.25.1
56
diff --git a/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch b/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch
index abc5faa21c..86a4bb1ea5 100644
--- a/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch
+++ b/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch
@@ -1,7 +1,7 @@
1From 01fe178b292db12d811811ff2d8d56b225e4b5e8 Mon Sep 17 00:00:00 2001 1From 1546d837c69b654754ee137af1fa1c2f7500cfa2 Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com> 2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:16:32 +0430 3Date: Wed, 23 Oct 2019 21:16:32 +0430
4Subject: [PATCH] ld: add soname to shareable objects 4Subject: [PATCH 03/11] ld: add soname to shareable objects
5 5
6so that OE's shared library dependency handling 6so that OE's shared library dependency handling
7can find them. 7can find them.
@@ -19,10 +19,10 @@ Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
19 1 file changed, 3 insertions(+) 19 1 file changed, 3 insertions(+)
20 20
21diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go 21diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
22index eab74dc..ae9bbc9 100644 22index 2d8f964f35..dfc72e02c0 100644
23--- a/src/cmd/link/internal/ld/lib.go 23--- a/src/cmd/link/internal/ld/lib.go
24+++ b/src/cmd/link/internal/ld/lib.go 24+++ b/src/cmd/link/internal/ld/lib.go
25@@ -1576,6 +1576,7 @@ func (ctxt *Link) hostlink() { 25@@ -1624,6 +1624,7 @@ func (ctxt *Link) hostlink() {
26 argv = append(argv, "-Wl,-z,relro") 26 argv = append(argv, "-Wl,-z,relro")
27 } 27 }
28 argv = append(argv, "-shared") 28 argv = append(argv, "-shared")
@@ -30,7 +30,7 @@ index eab74dc..ae9bbc9 100644
30 if ctxt.HeadType == objabi.Hwindows { 30 if ctxt.HeadType == objabi.Hwindows {
31 argv = addASLRargs(argv, *flagAslr) 31 argv = addASLRargs(argv, *flagAslr)
32 } else { 32 } else {
33@@ -1591,6 +1592,7 @@ func (ctxt *Link) hostlink() { 33@@ -1639,6 +1640,7 @@ func (ctxt *Link) hostlink() {
34 argv = append(argv, "-Wl,-z,relro") 34 argv = append(argv, "-Wl,-z,relro")
35 } 35 }
36 argv = append(argv, "-shared") 36 argv = append(argv, "-shared")
@@ -38,7 +38,7 @@ index eab74dc..ae9bbc9 100644
38 case BuildModePlugin: 38 case BuildModePlugin:
39 if ctxt.HeadType == objabi.Hdarwin { 39 if ctxt.HeadType == objabi.Hdarwin {
40 argv = append(argv, "-dynamiclib") 40 argv = append(argv, "-dynamiclib")
41@@ -1599,6 +1601,7 @@ func (ctxt *Link) hostlink() { 41@@ -1647,6 +1649,7 @@ func (ctxt *Link) hostlink() {
42 argv = append(argv, "-Wl,-z,relro") 42 argv = append(argv, "-Wl,-z,relro")
43 } 43 }
44 argv = append(argv, "-shared") 44 argv = append(argv, "-shared")
@@ -46,3 +46,6 @@ index eab74dc..ae9bbc9 100644
46 } 46 }
47 } 47 }
48 48
49--
502.25.1
51
diff --git a/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch b/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch
index 9df43c46d0..abbb7bda2b 100644
--- a/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch
+++ b/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -1,7 +1,8 @@
1From e47d157631d1b97403f253c63d361b7380b32c22 Mon Sep 17 00:00:00 2001 1From b41aaa851f0074682fcd4bf07c891fbdf0fdf70c Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com> 2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:17:16 +0430 3Date: Sat, 22 Feb 2025 03:14:37 -0800
4Subject: [PATCH] make.bash: override CC when building dist and go_bootstrap 4Subject: [PATCH 04/11] make.bash: override CC when building dist and
5 go_bootstrap
5 6
6for handling OE cross-canadian builds. 7for handling OE cross-canadian builds.
7 8
@@ -13,24 +14,27 @@ Upstream-Status: Inappropriate [OE specific]
13 14
14Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> 15Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
15Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> 16Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
17
18Rebase to 1.23.4
19Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16--- 20---
17 src/make.bash | 4 ++-- 21 src/make.bash | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-) 22 1 file changed, 2 insertions(+), 2 deletions(-)
19 23
20diff --git a/src/make.bash b/src/make.bash 24diff --git a/src/make.bash b/src/make.bash
21index 76ad516..074e129 100755 25index b67ae1529f..b59cdabd09 100755
22--- a/src/make.bash 26--- a/src/make.bash
23+++ b/src/make.bash 27+++ b/src/make.bash
24@@ -198,7 +198,7 @@ if [[ "$GOROOT_BOOTSTRAP" == "$GOROOT" ]]; then 28@@ -153,7 +153,7 @@ fi
25 exit 1 29 export GOROOT_BOOTSTRAP
26 fi 30
27 rm -f cmd/dist/dist 31 bootstrapenv() {
28-GOROOT="$GOROOT_BOOTSTRAP" nogoenv "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist 32- GOROOT="$GOROOT_BOOTSTRAP" GO111MODULE=off GOENV=off GOOS= GOARCH= GOEXPERIMENT= GOFLAGS= "$@"
29+CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" nogoenv "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist 33+ CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GO111MODULE=off GOENV=off GOOS= GOARCH= GOEXPERIMENT= GOFLAGS= "$@"
34 }
30 35
31 # -e doesn't propagate out of eval, so check success by hand. 36 export GOROOT="$(cd .. && pwd)"
32 eval $(./cmd/dist/dist env -p || echo FAIL=true) 37@@ -216,7 +216,7 @@ fi
33@@ -223,7 +223,7 @@ fi
34 # Run dist bootstrap to complete make.bash. 38 # Run dist bootstrap to complete make.bash.
35 # Bootstrap installs a proper cmd/dist, built with the new toolchain. 39 # Bootstrap installs a proper cmd/dist, built with the new toolchain.
36 # Throw ours, built with the bootstrap toolchain, away after bootstrap. 40 # Throw ours, built with the bootstrap toolchain, away after bootstrap.
@@ -39,3 +43,6 @@ index 76ad516..074e129 100755
39 rm -f ./cmd/dist/dist 43 rm -f ./cmd/dist/dist
40 44
41 # DO NOT ADD ANY NEW CODE HERE. 45 # DO NOT ADD ANY NEW CODE HERE.
46--
472.25.1
48
diff --git a/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch b/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch
index bc25d08fbf..f7c3108a98 100644
--- a/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch
+++ b/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch
@@ -1,7 +1,7 @@
1From bae1cec790ff17c4c93a2f8fda27036e5e021f6d Mon Sep 17 00:00:00 2001 1From 12bf824f8b7e85f05434aa00e866e883a551aaeb Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com> 2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:18:12 +0430 3Date: Fri, 28 Feb 2025 19:09:17 -0800
4Subject: [PATCH] cmd/dist: separate host and target builds 4Subject: [PATCH 05/11] cmd/dist: separate host and target builds
5 5
6Change the dist tool to allow for OE-style cross- 6Change the dist tool to allow for OE-style cross-
7and cross-canadian builds: 7and cross-canadian builds:
@@ -40,23 +40,26 @@ Upstream-Status: Inappropriate [OE specific]
40 40
41Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> 41Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
42Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> 42Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
43
44Rebase to 1.24.0
45Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
43--- 46---
44 src/cmd/dist/build.go | 76 ++++++++++++++++++++++++++++++++++++++++++- 47 src/cmd/dist/build.go | 76 ++++++++++++++++++++++++++++++++++++++++++-
45 1 file changed, 75 insertions(+), 1 deletion(-) 48 1 file changed, 75 insertions(+), 1 deletion(-)
46 49
47diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go 50diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
48index 06ee4de..016b1dd 100644 51index b62e518030..0c54d82300 100644
49--- a/src/cmd/dist/build.go 52--- a/src/cmd/dist/build.go
50+++ b/src/cmd/dist/build.go 53+++ b/src/cmd/dist/build.go
51@@ -46,6 +46,7 @@ var ( 54@@ -49,6 +49,7 @@ var (
52 goexperiment string 55 gofips140 string
53 workdir string 56 workdir string
54 tooldir string 57 tooldir string
55+ build_tooldir string 58+ build_tooldir string
56 oldgoos string 59 oldgoos string
57 oldgoarch string 60 oldgoarch string
58 oldgocache string 61 oldgocache string
59@@ -58,6 +59,7 @@ var ( 62@@ -61,6 +62,7 @@ var (
60 rebuildall bool 63 rebuildall bool
61 noOpt bool 64 noOpt bool
62 isRelease bool 65 isRelease bool
@@ -64,7 +67,7 @@ index 06ee4de..016b1dd 100644
64 67
65 vflag int // verbosity 68 vflag int // verbosity
66 ) 69 )
67@@ -265,6 +267,8 @@ func xinit() { 70@@ -286,6 +288,8 @@ func xinit() {
68 71
69 goversion := findgoversion() 72 goversion := findgoversion()
70 isRelease = strings.HasPrefix(goversion, "release.") || strings.HasPrefix(goversion, "go") 73 isRelease = strings.HasPrefix(goversion, "release.") || strings.HasPrefix(goversion, "go")
@@ -73,7 +76,7 @@ index 06ee4de..016b1dd 100644
73 } 76 }
74 77
75 // compilerEnv returns a map from "goos/goarch" to the 78 // compilerEnv returns a map from "goos/goarch" to the
76@@ -499,8 +503,10 @@ func setup() { 79@@ -547,8 +551,10 @@ func setup() {
77 goosGoarch := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch) 80 goosGoarch := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch)
78 if rebuildall { 81 if rebuildall {
79 xremoveall(goosGoarch) 82 xremoveall(goosGoarch)
@@ -84,7 +87,7 @@ index 06ee4de..016b1dd 100644
84 xatexit(func() { 87 xatexit(func() {
85 if files := xreaddir(goosGoarch); len(files) == 0 { 88 if files := xreaddir(goosGoarch); len(files) == 0 {
86 xremove(goosGoarch) 89 xremove(goosGoarch)
87@@ -1338,14 +1344,20 @@ func cmdbootstrap() { 90@@ -1411,14 +1417,20 @@ func cmdbootstrap() {
88 defer timelog("end", "dist bootstrap") 91 defer timelog("end", "dist bootstrap")
89 92
90 var debug, distpack, force, noBanner, noClean bool 93 var debug, distpack, force, noBanner, noClean bool
@@ -106,7 +109,7 @@ index 06ee4de..016b1dd 100644
106 109
107 if noClean { 110 if noClean {
108 xprintf("warning: --no-clean is deprecated and has no effect; use 'go install std cmd' instead\n") 111 xprintf("warning: --no-clean is deprecated and has no effect; use 'go install std cmd' instead\n")
109@@ -1357,6 +1369,18 @@ func cmdbootstrap() { 112@@ -1430,6 +1442,18 @@ func cmdbootstrap() {
110 "Use the -force flag to build anyway.\n", goos, goarch) 113 "Use the -force flag to build anyway.\n", goos, goarch)
111 } 114 }
112 115
@@ -125,7 +128,7 @@ index 06ee4de..016b1dd 100644
125 // Set GOPATH to an internal directory. We shouldn't actually 128 // Set GOPATH to an internal directory. We shouldn't actually
126 // need to store files here, since the toolchain won't 129 // need to store files here, since the toolchain won't
127 // depend on modules outside of vendor directories, but if 130 // depend on modules outside of vendor directories, but if
128@@ -1434,9 +1458,14 @@ func cmdbootstrap() { 131@@ -1513,9 +1537,14 @@ func cmdbootstrap() {
129 xprintf("\n") 132 xprintf("\n")
130 } 133 }
131 134
@@ -140,7 +143,7 @@ index 06ee4de..016b1dd 100644
140 goBootstrap := pathf("%s/go_bootstrap", tooldir) 143 goBootstrap := pathf("%s/go_bootstrap", tooldir)
141 if debug { 144 if debug {
142 run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") 145 run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
143@@ -1464,7 +1493,11 @@ func cmdbootstrap() { 146@@ -1543,7 +1572,11 @@ func cmdbootstrap() {
144 xprintf("\n") 147 xprintf("\n")
145 } 148 }
146 xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n") 149 xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
@@ -152,7 +155,7 @@ index 06ee4de..016b1dd 100644
152 // Now that cmd/go is in charge of the build process, enable GOEXPERIMENT. 155 // Now that cmd/go is in charge of the build process, enable GOEXPERIMENT.
153 os.Setenv("GOEXPERIMENT", goexperiment) 156 os.Setenv("GOEXPERIMENT", goexperiment)
154 // No need to enable PGO for toolchain2. 157 // No need to enable PGO for toolchain2.
155@@ -1517,6 +1550,7 @@ func cmdbootstrap() { 158@@ -1596,6 +1629,7 @@ func cmdbootstrap() {
156 os.Setenv("GOCACHE", oldgocache) 159 os.Setenv("GOCACHE", oldgocache)
157 } 160 }
158 161
@@ -160,7 +163,7 @@ index 06ee4de..016b1dd 100644
160 if goos == oldgoos && goarch == oldgoarch { 163 if goos == oldgoos && goarch == oldgoarch {
161 // Common case - not setting up for cross-compilation. 164 // Common case - not setting up for cross-compilation.
162 timelog("build", "toolchain") 165 timelog("build", "toolchain")
163@@ -1560,6 +1594,42 @@ func cmdbootstrap() { 166@@ -1639,6 +1673,42 @@ func cmdbootstrap() {
164 checkNotStale(toolenv(), goBootstrap, toolchain...) 167 checkNotStale(toolenv(), goBootstrap, toolchain...)
165 copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec) 168 copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
166 } 169 }
@@ -203,7 +206,7 @@ index 06ee4de..016b1dd 100644
203 206
204 // Check that there are no new files in $GOROOT/bin other than 207 // Check that there are no new files in $GOROOT/bin other than
205 // go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling). 208 // go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling).
206@@ -1582,8 +1652,12 @@ func cmdbootstrap() { 209@@ -1661,8 +1731,12 @@ func cmdbootstrap() {
207 } 210 }
208 } 211 }
209 212
@@ -216,3 +219,6 @@ index 06ee4de..016b1dd 100644
216 219
217 if goos == "android" { 220 if goos == "android" {
218 // Make sure the exec wrapper will sync a fresh $GOROOT to the device. 221 // Make sure the exec wrapper will sync a fresh $GOROOT to the device.
222--
2232.25.1
224
diff --git a/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch b/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch
index 4a57b07b7a..b29da334ec 100644
--- a/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch
+++ b/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch
@@ -1,7 +1,7 @@
1From a31db6f78d851741aea1e76132a84a24138a5bc6 Mon Sep 17 00:00:00 2001 1From ba3caa9f969bac2b937f8f1ffed4a3679cd16ec7 Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com> 2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:18:56 +0430 3Date: Wed, 23 Oct 2019 21:18:56 +0430
4Subject: [PATCH] cmd/go: make GOROOT precious by default 4Subject: [PATCH 06/11] cmd/go: make GOROOT precious by default
5 5
6The go build tool normally rebuilds whatever it detects is 6The go build tool normally rebuilds whatever it detects is
7stale. This can be a problem when GOROOT is intended to 7stale. This can be a problem when GOROOT is intended to
@@ -29,10 +29,10 @@ Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
29 3 files changed, 34 insertions(+) 29 3 files changed, 34 insertions(+)
30 30
31diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go 31diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
32index a59072e..9e35ebd 100644 32index 44bb9f8c1e..87ac4e30e5 100644
33--- a/src/cmd/go/internal/work/action.go 33--- a/src/cmd/go/internal/work/action.go
34+++ b/src/cmd/go/internal/work/action.go 34+++ b/src/cmd/go/internal/work/action.go
35@@ -754,6 +754,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) { 35@@ -837,6 +837,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) {
36 if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] { 36 if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] {
37 continue 37 continue
38 } 38 }
@@ -43,10 +43,10 @@ index a59072e..9e35ebd 100644
43 // TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild, 43 // TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild,
44 // we'll end up building an overall library or executable that depends at runtime 44 // we'll end up building an overall library or executable that depends at runtime
45diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go 45diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
46index 408edb5..3d60252 100644 46index 3508d51fbb..77f5e7241a 100644
47--- a/src/cmd/go/internal/work/build.go 47--- a/src/cmd/go/internal/work/build.go
48+++ b/src/cmd/go/internal/work/build.go 48+++ b/src/cmd/go/internal/work/build.go
49@@ -233,6 +233,8 @@ See also: go install, go get, go clean. 49@@ -238,6 +238,8 @@ See also: go install, go get, go clean.
50 50
51 const concurrentGCBackendCompilationEnabledByDefault = true 51 const concurrentGCBackendCompilationEnabledByDefault = true
52 52
@@ -55,7 +55,7 @@ index 408edb5..3d60252 100644
55 func init() { 55 func init() {
56 // break init cycle 56 // break init cycle
57 CmdBuild.Run = runBuild 57 CmdBuild.Run = runBuild
58@@ -246,6 +248,10 @@ func init() { 58@@ -251,6 +253,10 @@ func init() {
59 AddCoverFlags(CmdBuild, nil) 59 AddCoverFlags(CmdBuild, nil)
60 AddCoverFlags(CmdInstall, nil) 60 AddCoverFlags(CmdInstall, nil)
61 } 61 }
@@ -67,10 +67,10 @@ index 408edb5..3d60252 100644
67 67
68 // Note that flags consulted by other parts of the code 68 // Note that flags consulted by other parts of the code
69diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go 69diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
70index 9724cd0..544df46 100644 70index 1f618be0bb..651fa64582 100644
71--- a/src/cmd/go/internal/work/exec.go 71--- a/src/cmd/go/internal/work/exec.go
72+++ b/src/cmd/go/internal/work/exec.go 72+++ b/src/cmd/go/internal/work/exec.go
73@@ -544,6 +544,23 @@ func (b *Builder) build(ctx context.Context, a *Action) (err error) { 73@@ -552,6 +552,23 @@ func (b *Builder) build(ctx context.Context, a *Action) (err error) {
74 return err 74 return err
75 } 75 }
76 76
@@ -94,7 +94,7 @@ index 9724cd0..544df46 100644
94 if err := sh.Mkdir(a.Objdir); err != nil { 94 if err := sh.Mkdir(a.Objdir); err != nil {
95 return err 95 return err
96 } 96 }
97@@ -1737,6 +1754,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) { 97@@ -1747,6 +1764,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) {
98 return err 98 return err
99 } 99 }
100 100
@@ -109,3 +109,6 @@ index 9724cd0..544df46 100644
109 if err := b.Shell(a).Mkdir(a.Objdir); err != nil { 109 if err := b.Shell(a).Mkdir(a.Objdir); err != nil {
110 return err 110 return err
111 } 111 }
112--
1132.25.1
114
diff --git a/meta/recipes-devtools/go/go/0007-exec.go-filter-out-build-specific-paths-from-linker-.patch b/meta/recipes-devtools/go/go/0007-exec.go-filter-out-build-specific-paths-from-linker-.patch
index 2fdd52974f..9a701c7a6b 100644
--- a/meta/recipes-devtools/go/go/0007-exec.go-filter-out-build-specific-paths-from-linker-.patch
+++ b/meta/recipes-devtools/go/go/0007-exec.go-filter-out-build-specific-paths-from-linker-.patch
@@ -1,7 +1,8 @@
1From 1097a07b097043e15fe29a85326dbd196401244a Mon Sep 17 00:00:00 2001 1From 2197f813c9cff65eedef44473872ec5ea9ced227 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 27 Feb 2024 18:06:51 +0800 3Date: Tue, 27 Feb 2024 18:06:51 +0800
4Subject: [PATCH] exec.go: filter out build-specific paths from linker flags 4Subject: [PATCH 07/11] exec.go: filter out build-specific paths from linker
5 flags
5 6
6The flags can contain build-specific paths, breaking reproducibility. 7The flags can contain build-specific paths, breaking reproducibility.
7Filter out options that have build-specific paths. 8Filter out options that have build-specific paths.
@@ -15,10 +16,10 @@ Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
15 1 file changed, 24 insertions(+), 1 deletion(-) 16 1 file changed, 24 insertions(+), 1 deletion(-)
16 17
17diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go 18diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
18index 544df46..c8f297c 100644 19index 651fa64582..586079afb4 100644
19--- a/src/cmd/go/internal/work/exec.go 20--- a/src/cmd/go/internal/work/exec.go
20+++ b/src/cmd/go/internal/work/exec.go 21+++ b/src/cmd/go/internal/work/exec.go
21@@ -1401,6 +1401,29 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID { 22@@ -1426,6 +1426,29 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID {
22 return h.Sum() 23 return h.Sum()
23 } 24 }
24 25
@@ -48,7 +49,7 @@ index 544df46..c8f297c 100644
48 // printLinkerConfig prints the linker config into the hash h, 49 // printLinkerConfig prints the linker config into the hash h,
49 // as part of the computation of a linker-related action ID. 50 // as part of the computation of a linker-related action ID.
50 func (b *Builder) printLinkerConfig(h io.Writer, p *load.Package) { 51 func (b *Builder) printLinkerConfig(h io.Writer, p *load.Package) {
51@@ -1411,7 +1434,7 @@ func (b *Builder) printLinkerConfig(h io.Writer, p *load.Package) { 52@@ -1436,7 +1459,7 @@ func (b *Builder) printLinkerConfig(h io.Writer, p *load.Package) {
52 case "gc": 53 case "gc":
53 fmt.Fprintf(h, "link %s %q %s\n", b.toolID("link"), forcedLdflags, ldBuildmode) 54 fmt.Fprintf(h, "link %s %q %s\n", b.toolID("link"), forcedLdflags, ldBuildmode)
54 if p != nil { 55 if p != nil {
@@ -57,3 +58,6 @@ index 544df46..c8f297c 100644
57 } 58 }
58 59
59 // GOARM, GOMIPS, etc. 60 // GOARM, GOMIPS, etc.
61--
622.25.1
63
diff --git a/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch b/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
index 4c1f0ca145..a9cb2a4b84 100644
--- a/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
+++ b/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
@@ -1,8 +1,8 @@
1From e5af6155f2d6e0758d11d6c12d6f47ea8e65b141 Mon Sep 17 00:00:00 2001 1From e5752b239707df8ad7a72dc60420e01c5912d606 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 10 Nov 2020 16:33:27 +0000 3Date: Tue, 10 Nov 2020 16:33:27 +0000
4Subject: [PATCH] src/cmd/dist/buildgo.go: do not hardcode host compilers into 4Subject: [PATCH 08/11] src/cmd/dist/buildgo.go: do not hardcode host compilers
5 target binaries 5 into target binaries
6 6
7These come from $CC/$CXX on the build host and are not useful on targets; 7These come from $CC/$CXX on the build host and are not useful on targets;
8additionally as they contain host specific paths, this helps reproducibility. 8additionally as they contain host specific paths, this helps reproducibility.
@@ -16,7 +16,7 @@ Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
16 1 file changed, 4 insertions(+), 4 deletions(-) 16 1 file changed, 4 insertions(+), 4 deletions(-)
17 17
18diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go 18diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go
19index 884e9d7..2f52eda 100644 19index 884e9d729a..2f52edacfe 100644
20--- a/src/cmd/dist/buildgo.go 20--- a/src/cmd/dist/buildgo.go
21+++ b/src/cmd/dist/buildgo.go 21+++ b/src/cmd/dist/buildgo.go
22@@ -51,8 +51,8 @@ func mkzdefaultcc(dir, file string) { 22@@ -51,8 +51,8 @@ func mkzdefaultcc(dir, file string) {
@@ -41,3 +41,6 @@ index 884e9d7..2f52eda 100644
41 writefile(buf.String(), file, writeSkipSame) 41 writefile(buf.String(), file, writeSkipSame)
42 } 42 }
43 43
44--
452.25.1
46
diff --git a/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch b/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch
index d939cb4716..d47c4b1d31 100644
--- a/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch
+++ b/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch
@@ -1,7 +1,7 @@
1From 6bdd6405ce63c7aa4b35cd85833d03c7f1b9109a Mon Sep 17 00:00:00 2001 1From 79a1c80ed43f2a541bcab665656a4e2bb87baab3 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org> 2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Sat, 2 Jul 2022 23:08:13 +0100 3Date: Sat, 2 Jul 2022 23:08:13 +0100
4Subject: [PATCH] go: Filter build paths on staticly linked arches 4Subject: [PATCH 09/11] go: Filter build paths on staticly linked arches
5 5
6Filter out build time paths from ldflags and other flags variables when they're 6Filter out build time paths from ldflags and other flags variables when they're
7embedded in the go binary so that builds are reproducible regardless of build 7embedded in the go binary so that builds are reproducible regardless of build
@@ -17,10 +17,10 @@ Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
17 1 file changed, 13 insertions(+), 2 deletions(-) 17 1 file changed, 13 insertions(+), 2 deletions(-)
18 18
19diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go 19diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
20index 1549800..f41fb2c 100644 20index 15f6b2e87b..47c5b865a1 100644
21--- a/src/cmd/go/internal/load/pkg.go 21--- a/src/cmd/go/internal/load/pkg.go
22+++ b/src/cmd/go/internal/load/pkg.go 22+++ b/src/cmd/go/internal/load/pkg.go
23@@ -2277,6 +2277,17 @@ func appendBuildSetting(info *debug.BuildInfo, key, value string) { 23@@ -2291,6 +2291,17 @@ func appendBuildSetting(info *debug.BuildInfo, key, value string) {
24 info.Settings = append(info.Settings, debug.BuildSetting{Key: key, Value: value}) 24 info.Settings = append(info.Settings, debug.BuildSetting{Key: key, Value: value})
25 } 25 }
26 26
@@ -38,7 +38,7 @@ index 1549800..f41fb2c 100644
38 // setBuildInfo gathers build information and sets it into 38 // setBuildInfo gathers build information and sets it into
39 // p.Internal.BuildInfo, which will later be formatted as a string and embedded 39 // p.Internal.BuildInfo, which will later be formatted as a string and embedded
40 // in the binary. setBuildInfo should only be called on a main package with no 40 // in the binary. setBuildInfo should only be called on a main package with no
41@@ -2384,7 +2395,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) { 41@@ -2398,7 +2409,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) {
42 if gcflags := BuildGcflags.String(); gcflags != "" && cfg.BuildContext.Compiler == "gc" { 42 if gcflags := BuildGcflags.String(); gcflags != "" && cfg.BuildContext.Compiler == "gc" {
43 appendSetting("-gcflags", gcflags) 43 appendSetting("-gcflags", gcflags)
44 } 44 }
@@ -47,7 +47,7 @@ index 1549800..f41fb2c 100644
47 // https://go.dev/issue/52372: only include ldflags if -trimpath is not set, 47 // https://go.dev/issue/52372: only include ldflags if -trimpath is not set,
48 // since it can include system paths through various linker flags (notably 48 // since it can include system paths through various linker flags (notably
49 // -extar, -extld, and -extldflags). 49 // -extar, -extld, and -extldflags).
50@@ -2427,7 +2438,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) { 50@@ -2444,7 +2455,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) {
51 // subset of flags that are known not to be paths? 51 // subset of flags that are known not to be paths?
52 if cfg.BuildContext.CgoEnabled && !cfg.BuildTrimpath { 52 if cfg.BuildContext.CgoEnabled && !cfg.BuildTrimpath {
53 for _, name := range []string{"CGO_CFLAGS", "CGO_CPPFLAGS", "CGO_CXXFLAGS", "CGO_LDFLAGS"} { 53 for _, name := range []string{"CGO_CFLAGS", "CGO_CPPFLAGS", "CGO_CXXFLAGS", "CGO_LDFLAGS"} {
@@ -56,3 +56,6 @@ index 1549800..f41fb2c 100644
56 } 56 }
57 } 57 }
58 appendSetting("GOARCH", cfg.BuildContext.GOARCH) 58 appendSetting("GOARCH", cfg.BuildContext.GOARCH)
59--
602.25.1
61
diff --git a/meta/recipes-devtools/go/go/6d265b008e3d106b2706645e5a88cd8e2fb98953.patch b/meta/recipes-devtools/go/go/6d265b008e3d106b2706645e5a88cd8e2fb98953.patch
index d858cc6408..58bd00fc73 100644
--- a/meta/recipes-devtools/go/go/6d265b008e3d106b2706645e5a88cd8e2fb98953.patch
+++ b/meta/recipes-devtools/go/go/6d265b008e3d106b2706645e5a88cd8e2fb98953.patch
@@ -14,12 +14,14 @@ Change-Id: I9f377e47c22ef20497479c0978c053ed5de46a38
14 14
15Upstream-Status: Submitted [https://go-review.googlesource.com/c/go/+/391115] 15Upstream-Status: Submitted [https://go-review.googlesource.com/c/go/+/391115]
16--- 16---
17 src/cmd/link/internal/ld/lib.go | 21 ---------------------
18 1 file changed, 21 deletions(-)
17 19
18diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go 20diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
19index 2d8f964..fcf0bc7 100644 21index dfc72e02c0..2a2a304113 100644
20--- a/src/cmd/link/internal/ld/lib.go 22--- a/src/cmd/link/internal/ld/lib.go
21+++ b/src/cmd/link/internal/ld/lib.go 23+++ b/src/cmd/link/internal/ld/lib.go
22@@ -1670,27 +1670,6 @@ 24@@ -1673,27 +1673,6 @@ func (ctxt *Link) hostlink() {
23 // Use lld to avoid errors from default linker (issue #38838) 25 // Use lld to avoid errors from default linker (issue #38838)
24 altLinker = "lld" 26 altLinker = "lld"
25 } 27 }
@@ -47,3 +49,6 @@ index 2d8f964..fcf0bc7 100644
47 } 49 }
48 if ctxt.Arch.Family == sys.ARM64 && buildcfg.GOOS == "freebsd" { 50 if ctxt.Arch.Family == sys.ARM64 && buildcfg.GOOS == "freebsd" {
49 // Switch to ld.bfd on freebsd/arm64. 51 // Switch to ld.bfd on freebsd/arm64.
52--
532.25.1
54
diff --git a/meta/recipes-devtools/go/go_1.22.12.bb b/meta/recipes-devtools/go/go_1.24.0.bb
index 46f5fbc6be..46f5fbc6be 100644
--- a/meta/recipes-devtools/go/go_1.22.12.bb
+++ b/meta/recipes-devtools/go/go_1.24.0.bb