subtree updates
meta-raspberrypi: 95a9103f91..92a9b7a012:
Michał Kluska (1):
rpi-base: Added missing HiFiBerry
meta-openembedded: 9f0e513211..a0237019f5:
Alexander Stein (1):
libkcapi: Update HOMEPAGE url
Changqing Li (4):
syslog-ng: upgrade 4.0.1 -> 4.6.0
multipath-tools: upgrade 0.9.3 -> 0.9.8
nodejs: upgrade 20.11.0 -> 20.11.1
postgresql: upgrade 15.5 -> 16.2
Joe Slater (1):
googletest: allow for shared libraries
Khem Raj (17):
python3-fastjsonschema: Add missing ptest deps
python3-gpiod: Tests rely on configfs support in kernel
python3-pyzmq: Add missing dep on python3-unixadmin for ptests
python3-betamax: Upgrade to 0.9.0
libgpiod: Tests rely on configfs support in kernel
keyutils: Add missing rdep for ptests
fuse3: Make kmod as a recommendation instead of rdep for ptests
drbd-utils: Disable warnings as errors
influxdb: Define GOPROXY
crucible: Define GOPROXY
syzkaller: Fix build with go 1.21
e2tools: Delete unneeded files from ptest package
ptest-packagelists-meta-oe: Move libgpiod out of PTESTS_PROBLEMS_META_OE
ptest-packagelists-meta-python: Move py3-libgpiod out of PTESTS_PROBLEMS_META_PYTHON
pgpool2: Upgrade to 4.5.1
pgpool2: Fix build with postgresql 16+
emacs: Add packageconfig for selinux support
Krupal Ka Patel (1):
python3-aiohappyeyeballs: Correct the typo of BBCLASSEXTEND
Markus Volk (3):
folks: update 0.15.6 -> 0.15.7
mozjs-115: update 115.6.0 -> 115.8.0
polkit: update 123 -> 124
Martin Jansa (3):
ristretto: use python3native and depend on glib-2.0-native, python3-packaging-native
xfce4-notifyd: use python3native and depend on python3-packaging-native
fuse3: use 4 spaces for indentation
Mingli Yu (1):
nlohmann-json: Upgrade to 3.11.3
Randolph Sapp (1):
glmark2: add upstream patch to not care about stencil config
Ulrich Ölmann (1):
signing.bbclass: fix typos
Xiangyu Chen (3):
iperf3: upgrade 3.15 -> 3.16
grpc: upgrade 1.60.0 -> 1.60.1
drbd-utils: upgrade 9.22.0 -> 9.27.0
Yi Zhao (7):
openipmi: fix do_configure error when using dash
cryptsetup: upgrade 2.6.1 -> 2.7.0
layer.conf: Add nativesdk-libdevmapper PREFERRED_RPROVIDER
krb5: upgrade 1.20.2 -> 1.21.2
postfix: upgrade 3.7.3 -> 3.8.5
openldap: upgrade 2.5.16 -> 2.6.7
openvpn: upgrade 2.6.7 -> 2.6.9
Yoann Congal (3):
drbd-utils: Drop a duplicated line in DESCRIPTION
drbd-utils: Fix a udev rule reproducibility
toybox-inittab: Fix serial getty reproducibility
alperak (9):
python3-google-auth: upgrade 2.28.0 -> 2.28.1
python3-netaddr: upgrade 0.10.1 -> 1.2.1 and add ptest
ptest-packagelists-meta-python: Move python3-xlrd from PTESTS_PROBLEMS_META_PYTHON to PTESTS_FAST_META_PYTHON
python3-wrapt: add ptest
python3-freezegun: add recipe and add ptest
python3-dateutil: upgrade 2.8.2 -> 2.9.0
python3-types-python-dateutil: add recipe
python3-arrow: add ptest, update backend and runtime dependencies
python3-marshmallow: upgrade 3.20.2 -> 3.21.1 and add ptest
poky: 25d60ac6f6..7165c23237:
Alexander Kanavin (48):
xz: correct upstream version check
python3-sphinxcontrib-jquery: add a recipe and make python3-sphinx-rtd-theme depend on it
acl: upgrade 2.3.1 -> 2.3.2
appstream: upgrade 1.0.0 -> 1.0.2
boost: upgrade 1.83.0 -> 1.84.0
btrfs-tools: upgrade 6.5.3 -> 6.7.1
dnf: upgrade 4.18.2 -> 4.19.0
diffoscope: upgrade 253 -> 259
ell: upgrade 0.62 -> 0.63
elfutils: upgrade 0.189 -> 0.191
epiphany: upgrade 45.1 -> 45.3
gettext: upgrade 0.22.4 -> 0.22.5
glib-2.0: upgrade 2.78.3 -> 2.78.4
glib-networking: upgrade 2.78.0 -> 2.78.1
kmscube: upgrade to latest revision
libbsd: upgrade 0.11.8 -> 0.12.1
libdnf: update 0.72.0 -> 0.73.0
libpciaccess: upgrade 0.17 -> 0.18
libpcre2: upgrade 10.42 -> 10.43
librepo: update 1.16.0 -> 1.17.0
libusb1: upgrade 1.0.26 -> 1.0.27
libxml2: upgrade 2.11.5 -> 2.12.5
linux-firmware: upgrade 20231211 -> 20240220
librsvg: upgrade 2.56.3 -> 2.57.1
lsof: upgrade 4.98.0 -> 4.99.3
man-pages: upgrade 6.05.01 -> 6.06
mc: upgrade 4.8.30 -> 4.8.31
mesa: upgrade 24.0.1 -> 24.0.2
minicom: upgrade 2.8 -> 2.9
nghttp2: upgrade 1.59.0 -> 1.60.0
orc: upgrade 0.4.37 -> 0.4.38
puzzles: upgrade to latest revision
piglit: upgrade to latest revision
python3-build: upgrade 1.0.3 -> 1.1.1
python3-dtschema: upgrade 2023.7 -> 2024.2
python3-jsonschema: upgrade 4.17.3 -> 4.21.1 and add new dependencies
python3-ruamel-yaml: upgrade 0.17.35 -> 0.18.6
python3-setuptools: upgrade 69.0.3 -> 69.1.1
python3-wcwidth: upgrade 0.2.12 -> 0.2.13
repo: upgrade 2.41 -> 2.42
shaderc: update 2023.7 -> 2023.8
systemd: upgrade 255.1 -> 255.4
ttyrun: upgrade 2.30.0 -> 2.31.0
taglib: upgrade 1.13.1 -> 2.0 and add utfcpp recipe to support that
update-rc.d: upgrade to latest revision
vala: upgrade 0.56.13 -> 0.56.15
vulkan: upgrade 1.3.268.0 -> 1.3.275.0
webkitgtk: upgrade 2.42.2 -> 2.42.5
Bruce Ashfield (3):
linux-yocto/cfg/6.6: drop CONFIG_DEBUG_CREDENTIALS
linux-yocto/6.6: update to v6.6.20
linux-yocto/6.6: update CVE exclusions
Changqing Li (3):
rxvt-unicode: Fix installing of terminfo
systemd: fix dead link /var/log/README
go: filter out build specific path from the linker flags
Chen Qi (2):
systemd: use RDEPENDS for systemd-vconsole-setup
systemd: remove systemd-bus-proxy settings
Christian Taedcke (1):
image_types.bbclass: fix vfat image names
Eilís 'pidge' Ní Fhlannagáin (6):
qemurunner.py: Fix error on calls to run_monitor
screenshot-tests: Add initial screenshot test png files for core-image-sato
oeqa/runtime/login: Proof of concept for screenshot testcases
oeqa/runtime/login: Exclude qemuriscv64
oeqa/runtime/login: Add screenshot sample logic/timeout/dbus-wait
sstatetests.py: Add testing for correct sstate permissions
Fabio Estevam (1):
u-boot: Move UBOOT_INITIAL_ENV back to u-boot.inc
Geoff Parker (1):
ref-manual: variables: adding multiple groups in GROUPADD_PARAM
Johan Bezem (1):
ref-manual: variables: correct sdk installation default path
Jose Quaresma (7):
go: rework patch to avoid identation
go: bump 1.21.0
goarch: disable dynamic linking globally
oeqa/gotoolchain: set GOPROXY
go: upgrade 1.21.0 -> 1.21.5
go: upgrade 1.21.5 -> 1.21.7
go: bump 1.22.0
Khem Raj (4):
mesa,mesa-gl: Fix build when dri3 is not enabled
linux-yocto: Enable gpio-sim with ptests
rust: Fix build failure re-appeared on riscv32
gdb: Upgrade 14.1 -> 14.2
Luca Ceresoli (2):
ref-manual: tasks: do_cleanall: recommend using '-f' instead
ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate
Markus Volk (1):
gtk+3: update 3.24.38 -> 3.24.41
Michael Opdenacker (4):
core-image-full-cmdline: add package-management
bitbake: utils: remove BB_ENV_PASSTHROUGH from preserved_envvars()
dev-manual: packages: fix capitalization
manuals: document VIRTUAL-RUNTIME variables
Randy MacLeod (1):
valgrind: skip intermittently failing ptests
Richard Purdie (9):
no-gplv3: Tweak for packagemangement in core-image-full-cmdline
qemu: Replace workaround with proper usermode fix for shmat
bitbake: fetch/git: Avoid clean upon failure
go: Further tweak indentation in patch
go: Drop linkmode with nativesdk/cross-canadian
libpng: Update SRC_URI to avoid redirects
oeqa/runtime/login: Various code improvements and fixes
oeqa/runtime/login: Mask out the mouse panel icon for now
oeqa/runtime/login: Fix dbus-wait timeout and loop conditional
Robert P. J. Day (1):
python3-cryptography_42.0.5.bb: delete redundant ptest packaging
Ross Burton (2):
Add genericarm64 MACHINE
rxvt: add rxvt to desktop entry name
Simone Weiß (4):
coreutils: backport patch to fix heap overflow in split
qemu: backport patch for ui/clipboard issue
ref-manual: classes: add cve status check for oe.qa
contributor-guide: add notes for tests
Tim Orling (1):
python3-hypothesis: upgrade 6.98.12 -> 6.98.15
Trevor Woerner (2):
bmaptool: now part of Yocto Project
dev-manual: bmaptool: rename
Yi Zhao (1):
expat: upgrdae 2.6.0 -> 2.6.1
Yoann Congal (1):
bitbake: prserv/serv: Fix a PID file removal race on prserv stop
Change-Id: Ie94e4df79e3d8f68aea3377f816d7106987a05f8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/poky/meta/recipes-devtools/go/go-1.20.14.inc b/poky/meta/recipes-devtools/go/go-1.22.0.inc
similarity index 80%
rename from poky/meta/recipes-devtools/go/go-1.20.14.inc
rename to poky/meta/recipes-devtools/go/go-1.22.0.inc
index 7e425ef..5b94051 100644
--- a/poky/meta/recipes-devtools/go/go-1.20.14.inc
+++ b/poky/meta/recipes-devtools/go/go-1.22.0.inc
@@ -11,8 +11,8 @@
file://0004-make.bash-override-CC-when-building-dist-and-go_boot.patch \
file://0005-cmd-dist-separate-host-and-target-builds.patch \
file://0006-cmd-go-make-GOROOT-precious-by-default.patch \
- file://0007-exec.go-do-not-write-linker-flags-into-buildids.patch \
file://0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \
file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \
+ file://0001-exec.go-filter-out-build-specific-paths-from-linker-.patch \
"
-SRC_URI[main.sha256sum] = "1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b67f4e"
+SRC_URI[main.sha256sum] = "4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c"
diff --git a/poky/meta/recipes-devtools/go/go-binary-native_1.20.14.bb b/poky/meta/recipes-devtools/go/go-binary-native_1.22.0.bb
similarity index 78%
rename from poky/meta/recipes-devtools/go/go-binary-native_1.20.14.bb
rename to poky/meta/recipes-devtools/go/go-binary-native_1.22.0.bb
index 95211e6..acd2018 100644
--- a/poky/meta/recipes-devtools/go/go-binary-native_1.20.14.bb
+++ b/poky/meta/recipes-devtools/go/go-binary-native_1.22.0.bb
@@ -9,9 +9,9 @@
# Checksums available at https://go.dev/dl/
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] = "ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44"
-SRC_URI[go_linux_arm64.sha256sum] = "2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b"
-SRC_URI[go_linux_ppc64le.sha256sum] = "237b1da9b65629a9b0fcf1f3ca75b4c84ef55fca1fc3eadf1681da7bbcb2e9cd"
+SRC_URI[go_linux_amd64.sha256sum] = "f6c8a87aa03b92c4b0bf3d558e28ea03006eb29db78917daec5cfb6ec1046265"
+SRC_URI[go_linux_arm64.sha256sum] = "6a63fef0e050146f275bf02a0896badfe77c11b6f05499bb647e7bd613a45a10"
+SRC_URI[go_linux_ppc64le.sha256sum] = "0e57f421df9449066f00155ce98a5be93744b3d81b00ee4c2c9b511be2a31d93"
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.inc b/poky/meta/recipes-devtools/go/go-cross-canadian.inc
index 8298fe3..dd485b6 100644
--- a/poky/meta/recipes-devtools/go/go-cross-canadian.inc
+++ b/poky/meta/recipes-devtools/go/go-cross-canadian.inc
@@ -16,7 +16,7 @@
export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
export CGO_CFLAGS = "${CFLAGS}"
export CGO_LDFLAGS = "${LDFLAGS}"
-export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"'
+export GO_LDFLAGS = '-extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"'
do_configure[noexec] = "1"
diff --git a/poky/meta/recipes-devtools/go/go-cross-canadian_1.20.14.bb b/poky/meta/recipes-devtools/go/go-cross-canadian_1.22.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross-canadian_1.20.14.bb
rename to poky/meta/recipes-devtools/go/go-cross-canadian_1.22.0.bb
diff --git a/poky/meta/recipes-devtools/go/go-cross_1.20.14.bb b/poky/meta/recipes-devtools/go/go-cross_1.22.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-cross_1.20.14.bb
rename to poky/meta/recipes-devtools/go/go-cross_1.22.0.bb
diff --git a/poky/meta/recipes-devtools/go/go-crosssdk_1.20.14.bb b/poky/meta/recipes-devtools/go/go-crosssdk_1.22.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-crosssdk_1.20.14.bb
rename to poky/meta/recipes-devtools/go/go-crosssdk_1.22.0.bb
diff --git a/poky/meta/recipes-devtools/go/go-native_1.20.14.bb b/poky/meta/recipes-devtools/go/go-native_1.22.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-native_1.20.14.bb
rename to poky/meta/recipes-devtools/go/go-native_1.22.0.bb
diff --git a/poky/meta/recipes-devtools/go/go-runtime_1.20.14.bb b/poky/meta/recipes-devtools/go/go-runtime_1.22.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go-runtime_1.20.14.bb
rename to poky/meta/recipes-devtools/go/go-runtime_1.22.0.bb
diff --git a/poky/meta/recipes-devtools/go/go-target.inc b/poky/meta/recipes-devtools/go/go-target.inc
index a4b55ad..981c7ab 100644
--- a/poky/meta/recipes-devtools/go/go-target.inc
+++ b/poky/meta/recipes-devtools/go/go-target.inc
@@ -13,9 +13,7 @@
export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-prefix-map'), d.getVar('LDFLAGS').split())) }"
export GOCACHE = "${B}/.cache"
-GO_LDFLAGS = ""
-GO_LDFLAGS:class-nativesdk = " -linkmode external"
-export GO_LDFLAGS
+export GO_LDFLAGS = ""
export GOBUILDFLAGS = "-gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -trimpath"
CC:append:class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
diff --git a/poky/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch b/poky/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
index 9a25510..564837c 100644
--- a/poky/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
+++ b/poky/meta/recipes-devtools/go/go/0001-cmd-go-make-content-based-hash-generation-less-pedan.patch
@@ -1,4 +1,4 @@
-From 10766ca6f4007b96e3f6bf4fb496e5df74397eb9 Mon Sep 17 00:00:00 2001
+From 9a6c5040cbcd88b10ceb8ceaebc8d6158c086670 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 28 Mar 2022 10:59:03 -0700
Subject: [PATCH 1/9] cmd/go: make content-based hash generation less pedantic
@@ -25,16 +25,17 @@
Signed-off-by: Alex Kube <alexander.j.kube@gmail.com>
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/go/internal/envcmd/env.go | 2 +-
src/cmd/go/internal/work/exec.go | 44 ++++++++++++++++++++++++-------
2 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
-index 66ef5ce..fb7448a 100644
+index c7c2e83e0f..4a90d9da5c 100644
--- a/src/cmd/go/internal/envcmd/env.go
+++ b/src/cmd/go/internal/envcmd/env.go
-@@ -183,7 +183,7 @@ func ExtraEnvVarsCostly() []cfg.EnvVar {
+@@ -189,7 +189,7 @@ func ExtraEnvVarsCostly() []cfg.EnvVar {
}
}()
@@ -44,10 +45,10 @@
// Should not happen - b.CFlags was given an empty package.
fmt.Fprintf(os.Stderr, "go: invalid cflags: %v\n", err)
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
-index 67d1193..62e1774 100644
+index e05471b06c..9724cd07d0 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
-@@ -223,6 +223,8 @@ func (b *Builder) Do(ctx context.Context, root *Action) {
+@@ -232,6 +232,8 @@ func (b *Builder) Do(ctx context.Context, root *Action) {
writeActionGraph()
}
@@ -56,7 +57,7 @@
// buildActionID computes the action ID for a build action.
func (b *Builder) buildActionID(a *Action) cache.ActionID {
p := a.Package
-@@ -244,7 +246,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -253,7 +255,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
if p.Module != nil {
fmt.Fprintf(h, "module %s@%s\n", p.Module.Path, p.Module.Version)
}
@@ -65,7 +66,7 @@
// The Go compiler always hides the exact value of $GOROOT
// when building things in GOROOT.
//
-@@ -276,9 +278,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -285,9 +287,9 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
}
if len(p.CgoFiles)+len(p.SwigFiles)+len(p.SwigCXXFiles) > 0 {
fmt.Fprintf(h, "cgo %q\n", b.toolID("cgo"))
@@ -77,7 +78,7 @@
fmt.Fprintf(h, "CC=%q %q %q %q\n", ccExe, cppflags, cflags, ldflags)
// Include the C compiler tool ID so that if the C
// compiler changes we rebuild the package.
-@@ -286,14 +288,14 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -295,14 +297,14 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
fmt.Fprintf(h, "CC ID=%q\n", ccID)
}
if len(p.CXXFiles)+len(p.SwigCXXFiles) > 0 {
@@ -94,16 +95,16 @@
fmt.Fprintf(h, "FC=%q %q\n", fcExe, fflags)
if fcID, _, err := b.gccToolID(fcExe[0], "f95"); err == nil {
fmt.Fprintf(h, "FC ID=%q\n", fcID)
-@@ -310,7 +312,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
+@@ -319,7 +321,7 @@ func (b *Builder) buildActionID(a *Action) cache.ActionID {
}
}
- if p.Internal.BuildInfo != "" {
-- fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo)
-+ //fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo)
+ if p.Internal.BuildInfo != nil {
+- fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo.String())
++ //fmt.Fprintf(h, "modinfo %q\n", p.Internal.BuildInfo.String())
}
// Configuration specific to compiler toolchain.
-@@ -2989,8 +2991,25 @@ func envList(key, def string) []string {
+@@ -2679,8 +2681,25 @@ func envList(key, def string) []string {
return args
}
@@ -130,7 +131,7 @@
if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil {
return
}
-@@ -3006,6 +3025,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
+@@ -2696,6 +2715,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l
if ldflags, err = buildFlags("LDFLAGS", defaultCFlags, p.CgoLDFLAGS, checkLinkerFlags); err != nil {
return
}
@@ -144,24 +145,24 @@
return
}
-@@ -3021,7 +3047,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`)
-
- func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, gxxfiles, mfiles, ffiles []string) (outGo, outObj []string, err error) {
+@@ -2713,7 +2739,7 @@ func (b *Builder) cgo(a *Action, cgoExe, objdir string, pcCFLAGS, pcLDFLAGS, cgo
p := a.Package
+ sh := b.Shell(a)
+
- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p)
+ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, cgoFFLAGS, cgoLDFLAGS, err := b.CFlags(p, false)
if err != nil {
return nil, nil, err
}
-@@ -3577,7 +3603,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) {
+@@ -3268,7 +3294,7 @@ func (b *Builder) swigOne(a *Action, file, objdir string, pcCFLAGS []string, cxx
+ p := a.Package
+ sh := b.Shell(a)
- // Run SWIG on one SWIG input file.
- func (b *Builder) swigOne(a *Action, p *load.Package, file, objdir string, pcCFLAGS []string, cxx bool, intgosize string) (outGo, outC string, err error) {
- cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p)
+ cgoCPPFLAGS, cgoCFLAGS, cgoCXXFLAGS, _, _, err := b.CFlags(p, false)
if err != nil {
return "", "", err
}
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0001-exec.go-filter-out-build-specific-paths-from-linker-.patch b/poky/meta/recipes-devtools/go/go/0001-exec.go-filter-out-build-specific-paths-from-linker-.patch
new file mode 100644
index 0000000..c5bf28f
--- /dev/null
+++ b/poky/meta/recipes-devtools/go/go/0001-exec.go-filter-out-build-specific-paths-from-linker-.patch
@@ -0,0 +1,61 @@
+From 083b5c74b12a1abeb11dd7f58a1cb1593d0000c0 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 27 Feb 2024 18:06:51 +0800
+Subject: [PATCH] exec.go: filter out build-specific paths from linker flags
+
+The flags can contain build-specific paths, breaking reproducibility.
+Filter out options that have build-specific paths.
+
+Upstream-Status: Inappropriate [ Not perfect for upstream ]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/cmd/go/internal/work/exec.go | 25 ++++++++++++++++++++++++-
+ 1 file changed, 24 insertions(+), 1 deletion(-)
+
+diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
+index cde867b..e3ce17d 100644
+--- a/src/cmd/go/internal/work/exec.go
++++ b/src/cmd/go/internal/work/exec.go
+@@ -1358,6 +1358,29 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID {
+ return h.Sum()
+ }
+
++func filterLinkerFlags(flags []string) []string {
++ var newflags []string
++ var skipflag bool
++ skipflag = false
++ for i, flag := range flags {
++ if skipflag == true {
++ skipflag = false
++ continue
++ }
++ if strings.HasPrefix(flag, "--sysroot") || strings.HasPrefix(flag, "-fmacro-prefix-map") || strings.HasPrefix(flag, "-fdebug-prefix-map") || strings.HasPrefix(flag, "-ffile-prefix-map") || strings.HasPrefix(flag, "-fcanon-prefix-map") || strings.HasPrefix(flag, "-fprofile-prefix-map") || strings.HasPrefix(flag, "-Wl,-rpath-link"){
++ continue
++ } else if strings.HasPrefix(flag, "-extldflags") {
++ skipflag = true
++ newflags = append(newflags, flag)
++ var filterd_Extldflags []string = filterLinkerFlags(strings.Split(flags[i+1], " "))
++ newflags = append(newflags, strings.Join(filterd_Extldflags, " "))
++ } else {
++ newflags = append(newflags, flag)
++ }
++ }
++ return newflags
++}
++
+ // printLinkerConfig prints the linker config into the hash h,
+ // as part of the computation of a linker-related action ID.
+ func (b *Builder) printLinkerConfig(h io.Writer, p *load.Package) {
+@@ -1368,7 +1391,7 @@ func (b *Builder) printLinkerConfig(h io.Writer, p *load.Package) {
+ case "gc":
+ fmt.Fprintf(h, "link %s %q %s\n", b.toolID("link"), forcedLdflags, ldBuildmode)
+ if p != nil {
+- fmt.Fprintf(h, "linkflags %q\n", p.Internal.Ldflags)
++ fmt.Fprintf(h, "linkflags %q\n", filterLinkerFlags(p.Internal.Ldflags))
+ }
+
+ // GOARM, GOMIPS, etc.
+--
+2.25.1
+
diff --git a/poky/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch b/poky/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
index 6abd424..001c94a 100644
--- a/poky/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
+++ b/poky/meta/recipes-devtools/go/go/0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch
@@ -1,4 +1,4 @@
-From 5cca2fa5997292a87302bdc7e7ed3231371e98bd Mon Sep 17 00:00:00 2001
+From e3f9a8a69d3a340c1a1d0bba566e71f20f635a43 Mon Sep 17 00:00:00 2001
From: Alex Kube <alexander.j.kube@gmail.com>
Date: Wed, 23 Oct 2019 21:15:37 +0430
Subject: [PATCH 2/9] cmd/go: Allow GOTOOLDIR to be overridden in the
@@ -13,16 +13,17 @@
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/dist/build.go | 4 +++-
src/cmd/go/internal/cfg/cfg.go | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
-index c36a12e..5d31718 100644
+index 32e59b446a..06ee4de8a9 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
-@@ -264,7 +264,9 @@ func xinit() {
+@@ -259,7 +259,9 @@ func xinit() {
}
xatexit(rmworkdir)
@@ -30,14 +31,14 @@
+ if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
+ tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
+ }
- }
- // compilerEnv returns a map from "goos/goarch" to the
+ goversion := findgoversion()
+ isRelease = strings.HasPrefix(goversion, "release.") || strings.HasPrefix(goversion, "go")
diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
-index 3257140..bb46253 100644
+index a8daa2dfc3..393ada39c9 100644
--- a/src/cmd/go/internal/cfg/cfg.go
+++ b/src/cmd/go/internal/cfg/cfg.go
-@@ -229,7 +229,11 @@ func SetGOROOT(goroot string, isTestGo bool) {
+@@ -230,7 +230,11 @@ func SetGOROOT(goroot string, isTestGo bool) {
// This matches the initialization of ToolDir in go/build, except for
// using ctxt.GOROOT and the installed GOOS and GOARCH rather than the
// GOROOT, GOOS, and GOARCH reported by the runtime package.
@@ -51,5 +52,5 @@
}
}
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch b/poky/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch
index 8f5ad04..9cab296 100644
--- a/poky/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch
+++ b/poky/meta/recipes-devtools/go/go/0003-ld-add-soname-to-shareable-objects.patch
@@ -1,4 +1,4 @@
-From c7536a820f713013ab1d4acef74a4c8bd970bf8f Mon Sep 17 00:00:00 2001
+From 7dde77b3ce8138314dd2736604b1b110dbcc0ac1 Mon Sep 17 00:00:00 2001
From: Alex Kube <alexander.j.kube@gmail.com>
Date: Wed, 23 Oct 2019 21:16:32 +0430
Subject: [PATCH 3/9] ld: add soname to shareable objects
@@ -13,15 +13,16 @@
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/link/internal/ld/lib.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
-index 6eae900..0462ee8 100644
+index eab74dc328..ae9bbc9093 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
-@@ -1508,6 +1508,7 @@ func (ctxt *Link) hostlink() {
+@@ -1576,6 +1576,7 @@ func (ctxt *Link) hostlink() {
argv = append(argv, "-Wl,-z,relro")
}
argv = append(argv, "-shared")
@@ -29,7 +30,7 @@
if ctxt.HeadType == objabi.Hwindows {
argv = addASLRargs(argv, *flagAslr)
} else {
-@@ -1523,6 +1524,7 @@ func (ctxt *Link) hostlink() {
+@@ -1591,6 +1592,7 @@ func (ctxt *Link) hostlink() {
argv = append(argv, "-Wl,-z,relro")
}
argv = append(argv, "-shared")
@@ -37,7 +38,7 @@
case BuildModePlugin:
if ctxt.HeadType == objabi.Hdarwin {
argv = append(argv, "-dynamiclib")
-@@ -1531,6 +1533,7 @@ func (ctxt *Link) hostlink() {
+@@ -1599,6 +1601,7 @@ func (ctxt *Link) hostlink() {
argv = append(argv, "-Wl,-z,relro")
}
argv = append(argv, "-shared")
@@ -46,5 +47,5 @@
}
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch b/poky/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch
index 85e42f7..8889aef 100644
--- a/poky/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch
+++ b/poky/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -1,4 +1,4 @@
-From 31ff609cc3d3bfcc2f2257fda1dbaafaec31eb0b Mon Sep 17 00:00:00 2001
+From 9f59e46991074d3e3c4d00f3971e62bfcd707167 Mon Sep 17 00:00:00 2001
From: Alex Kube <alexander.j.kube@gmail.com>
Date: Wed, 23 Oct 2019 21:17:16 +0430
Subject: [PATCH 4/9] make.bash: override CC when building dist and
@@ -13,24 +13,25 @@
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/make.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/make.bash b/src/make.bash
-index c07f39b..6ca7242 100755
+index 76ad51624a..074e129a24 100755
--- a/src/make.bash
+++ b/src/make.bash
-@@ -194,7 +194,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
+@@ -198,7 +198,7 @@ if [[ "$GOROOT_BOOTSTRAP" == "$GOROOT" ]]; then
exit 1
fi
rm -f cmd/dist/dist
--GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" GOENV=off GOFLAGS="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
-+CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" GOENV=off GOFLAGS="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+-GOROOT="$GOROOT_BOOTSTRAP" nogoenv "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" nogoenv "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
# -e doesn't propagate out of eval, so check success by hand.
eval $(./cmd/dist/dist env -p || echo FAIL=true)
-@@ -219,7 +219,7 @@ fi
+@@ -223,7 +223,7 @@ fi
# Run dist bootstrap to complete make.bash.
# Bootstrap installs a proper cmd/dist, built with the new toolchain.
# Throw ours, built with the bootstrap toolchain, away after bootstrap.
@@ -40,5 +41,5 @@
# DO NOT ADD ANY NEW CODE HERE.
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch b/poky/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch
index 2959844..364fce9 100644
--- a/poky/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch
+++ b/poky/meta/recipes-devtools/go/go/0005-cmd-dist-separate-host-and-target-builds.patch
@@ -1,10 +1,8 @@
-From 7a191e5191c8b813e929caedb3f3918bb08692a1 Mon Sep 17 00:00:00 2001
+From 6dda78d528e60993a4688cd9d49440a726378ac8 Mon Sep 17 00:00:00 2001
From: Alex Kube <alexander.j.kube@gmail.com>
Date: Wed, 23 Oct 2019 21:18:12 +0430
Subject: [PATCH 5/9] cmd/dist: separate host and target builds
-Upstream-Status: Inappropriate [OE specific]
-
Change the dist tool to allow for OE-style cross-
and cross-canadian builds:
@@ -33,41 +31,49 @@
the meta/recipes-devtools/go tree by
Matt Madison <matt@madison.systems>.
+Rework the patch to avoid identation, it breaks formatting rules but
+makes the changes more obvious and maintainable.
+Jose Quaresma <jose.quaresma@foundries.io>
+Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Upstream-Status: Inappropriate [OE specific]
+
Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
- src/cmd/dist/build.go | 152 +++++++++++++++++++++++++++++++-----------
- 1 file changed, 113 insertions(+), 39 deletions(-)
+ src/cmd/dist/build.go | 76 ++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
-index 5d31718..1c7f308 100644
+index 06ee4de8a9..74b7c7098f 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
-@@ -44,6 +44,7 @@ var (
+@@ -46,6 +46,7 @@ var (
goexperiment string
workdir string
tooldir string
+ build_tooldir string
oldgoos string
oldgoarch string
- exe string
-@@ -55,6 +56,7 @@ var (
- rebuildall bool
- defaultclang bool
- noOpt bool
-+ crossBuild bool
+ oldgocache string
+@@ -58,6 +59,7 @@ var (
+ rebuildall bool
+ noOpt bool
+ isRelease bool
++ crossBuild bool
vflag int // verbosity
)
-@@ -267,6 +269,8 @@ func xinit() {
- if tooldir = os.Getenv("GOTOOLDIR"); tooldir == "" {
- tooldir = pathf("%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch)
- }
+@@ -265,6 +267,8 @@ func xinit() {
+
+ goversion := findgoversion()
+ isRelease = strings.HasPrefix(goversion, "release.") || strings.HasPrefix(goversion, "go")
+
+ build_tooldir = pathf("%s/pkg/tool/native_native", goroot)
}
// compilerEnv returns a map from "goos/goarch" to the
-@@ -468,8 +472,10 @@ func setup() {
+@@ -499,8 +503,10 @@ func setup() {
goosGoarch := pathf("%s/pkg/%s_%s", goroot, gohostos, gohostarch)
if rebuildall {
xremoveall(goosGoarch)
@@ -78,16 +84,18 @@
xatexit(func() {
if files := xreaddir(goosGoarch); len(files) == 0 {
xremove(goosGoarch)
-@@ -1276,17 +1282,35 @@ func cmdbootstrap() {
+@@ -1338,14 +1344,20 @@ func cmdbootstrap() {
+ defer timelog("end", "dist bootstrap")
- var noBanner, noClean bool
- var debug bool
+ var debug, distpack, force, noBanner, noClean bool
+ var hostOnly bool
+ var targetOnly bool
+ var toBuild = []string{"std", "cmd"}
+
flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
+ flag.BoolVar(&distpack, "distpack", distpack, "write distribution files to pkg/distpack")
+ flag.BoolVar(&force, "force", force, "build even if the port is marked as broken")
flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
flag.BoolVar(&noClean, "no-clean", noClean, "print deprecation warning")
+ flag.BoolVar(&hostOnly, "host-only", hostOnly, "build only host binaries, not target")
@@ -98,6 +106,8 @@
if noClean {
xprintf("warning: --no-clean is deprecated and has no effect; use 'go install std cmd' instead\n")
+@@ -1357,6 +1369,18 @@ func cmdbootstrap() {
+ "Use the -force flag to build anyway.\n", goos, goarch)
}
+ if hostOnly && targetOnly {
@@ -115,47 +125,46 @@
// Set GOPATH to an internal directory. We shouldn't actually
// need to store files here, since the toolchain won't
// depend on modules outside of vendor directories, but if
-@@ -1354,9 +1378,14 @@ func cmdbootstrap() {
+@@ -1434,9 +1458,14 @@ func cmdbootstrap() {
xprintf("\n")
}
-- gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
-- setNoOpt()
-- goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now
+ // For split host/target cross/cross-canadian builds, we don't
+ // want to be setting these flags until after we have compiled
+ // the toolchain that runs on the build host.
-+ if !crossBuild {
-+ gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
-+ setNoOpt()
-+ goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now
-+ }
++if !crossBuild {
+ gogcflags = os.Getenv("GO_GCFLAGS") // we were using $BOOT_GO_GCFLAGS until now
+ setNoOpt()
+ goldflags = os.Getenv("GO_LDFLAGS") // we were using $BOOT_GO_LDFLAGS until now
++}
goBootstrap := pathf("%s/go_bootstrap", tooldir)
- cmdGo := pathf("%s/go", gorootBin)
if debug {
-@@ -1385,7 +1414,11 @@ func cmdbootstrap() {
+ run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
+@@ -1464,7 +1493,11 @@ func cmdbootstrap() {
xprintf("\n")
}
xprintf("Building Go toolchain2 using go_bootstrap and Go toolchain1.\n")
-- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-+ if crossBuild {
++if !crossBuild {
+ os.Setenv("CC", compilerEnvLookup("CC", defaultcc, goos, goarch))
++} else {
+ os.Setenv("CC", defaultcc[""])
-+ } else {
-+ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-+ }
++}
// Now that cmd/go is in charge of the build process, enable GOEXPERIMENT.
os.Setenv("GOEXPERIMENT", goexperiment)
- goInstall(goBootstrap, toolchain...)
-@@ -1421,46 +1454,84 @@ func cmdbootstrap() {
- copyfile(pathf("%s/compile3", tooldir), pathf("%s/compile", tooldir), writeExec)
+ // No need to enable PGO for toolchain2.
+@@ -1517,6 +1550,7 @@ func cmdbootstrap() {
+ os.Setenv("GOCACHE", oldgocache)
}
-- if goos == oldgoos && goarch == oldgoarch {
-- // Common case - not setting up for cross-compilation.
-- timelog("build", "toolchain")
-- if vflag > 0 {
-- xprintf("\n")
-+ if crossBuild {
++if !crossBuild {
+ if goos == oldgoos && goarch == oldgoarch {
+ // Common case - not setting up for cross-compilation.
+ timelog("build", "toolchain")
+@@ -1560,6 +1594,42 @@ func cmdbootstrap() {
+ checkNotStale(toolenv(), goBootstrap, toolchain...)
+ copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
+ }
++} else {
+ gogcflags = os.Getenv("GO_GCFLAGS")
+ goldflags = os.Getenv("GO_LDFLAGS")
+ tool_files, _ := filepath.Glob(pathf("%s/*", tooldir))
@@ -171,8 +180,8 @@
+ xprintf("\n")
+ }
+ xprintf("Building %s for host, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
-+ goInstall(goBootstrap, toBuild...)
-+ checkNotStale(goBootstrap, toBuild...)
++ goInstall(toolenv(), goBootstrap, toBuild...)
++ checkNotStale(toolenv(), goBootstrap, toBuild...)
+ // Skip cmdGo staleness checks here, since we can't necessarily run the cmdGo binary
+
+ timelog("build", "target toolchain")
@@ -184,99 +193,29 @@
+ goarch = oldgoarch
+ os.Setenv("GOOS", goos)
+ os.Setenv("GOARCH", goarch)
-+ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
++ os.Setenv("CC", compilerEnvLookup("CC", defaultcc, goos, goarch))
+ xprintf("Building %s for target, %s/%s.\n", strings.Join(toBuild, ","), goos, goarch)
-+ goInstall(goBootstrap, toBuild...)
-+ checkNotStale(goBootstrap, toBuild...)
++ goInstall(toolenv(), goBootstrap, toBuild...)
++ checkNotStale(toolenv(), goBootstrap, toBuild...)
+ // Skip cmdGo staleness checks here, since we can't run the target's cmdGo binary
- }
-- xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
- } else {
-- // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
-- // Finish GOHOSTOS/GOHOSTARCH installation and then
-- // run GOOS/GOARCH installation.
-- timelog("build", "host toolchain")
-- if vflag > 0 {
-- xprintf("\n")
-+
-+ if goos == oldgoos && goarch == oldgoarch {
-+ // Common case - not setting up for cross-compilation.
-+ timelog("build", "toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ xprintf("Building packages and commands for %s/%s.\n", goos, goarch)
-+ } else {
-+ // GOOS/GOARCH does not match GOHOSTOS/GOHOSTARCH.
-+ // Finish GOHOSTOS/GOHOSTARCH installation and then
-+ // run GOOS/GOARCH installation.
-+ timelog("build", "host toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
-+ goInstall(goBootstrap, "std", "cmd")
-+ checkNotStale(goBootstrap, "std", "cmd")
-+ checkNotStale(cmdGo, "std", "cmd")
-+
-+ timelog("build", "target toolchain")
-+ if vflag > 0 {
-+ xprintf("\n")
-+ }
-+ goos = oldgoos
-+ goarch = oldgoarch
-+ os.Setenv("GOOS", goos)
-+ os.Setenv("GOARCH", goarch)
-+ os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-+ xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
- }
-- xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
- goInstall(goBootstrap, "std", "cmd")
- checkNotStale(goBootstrap, "std", "cmd")
- checkNotStale(cmdGo, "std", "cmd")
-
-- timelog("build", "target toolchain")
-- if vflag > 0 {
-- xprintf("\n")
-+ if debug {
-+ run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
-+ run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))
-+ checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
-+ copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
- }
-- goos = oldgoos
-- goarch = oldgoarch
-- os.Setenv("GOOS", goos)
-- os.Setenv("GOARCH", goarch)
-- os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
-- xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
-- }
-- targets := []string{"std", "cmd"}
-- goInstall(goBootstrap, targets...)
-- checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
-- checkNotStale(goBootstrap, targets...)
-- checkNotStale(cmdGo, targets...)
-- if debug {
-- run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
-- checkNotStale(goBootstrap, append(toolchain, "runtime/internal/sys")...)
-- copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec)
- }
++ }
++}
// Check that there are no new files in $GOROOT/bin other than
-@@ -1477,8 +1548,11 @@ func cmdbootstrap() {
+ // go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling).
+@@ -1582,8 +1652,12 @@ func cmdbootstrap() {
}
}
-- // Remove go_bootstrap now that we're done.
-- xremove(pathf("%s/go_bootstrap", tooldir))
+ // Except that for split host/target cross-builds, we need to
+ // keep it.
-+ if !crossBuild {
-+ xremove(pathf("%s/go_bootstrap", tooldir))
-+ }
++if !crossBuild {
+ // Remove go_bootstrap now that we're done.
+ xremove(pathf("%s/go_bootstrap"+exe, tooldir))
++}
if goos == "android" {
// Make sure the exec wrapper will sync a fresh $GOROOT to the device.
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch b/poky/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch
index 520e41d..262f1e9 100644
--- a/poky/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch
+++ b/poky/meta/recipes-devtools/go/go/0006-cmd-go-make-GOROOT-precious-by-default.patch
@@ -1,10 +1,8 @@
-From efab470498bb0a30ee2d00455a0c8c10459f6347 Mon Sep 17 00:00:00 2001
+From aff5a740d6286c04beb0593fc68b0aea5a95ad39 Mon Sep 17 00:00:00 2001
From: Alex Kube <alexander.j.kube@gmail.com>
Date: Wed, 23 Oct 2019 21:18:56 +0430
Subject: [PATCH 6/9] cmd/go: make GOROOT precious by default
-Upstream-Status: Inappropriate [OE specific]
-
The go build tool normally rebuilds whatever it detects is
stale. This can be a problem when GOROOT is intended to
be read-only and the go runtime has been built as a shared
@@ -20,7 +18,10 @@
the meta/recipes-devtools/go tree by
Matt Madison <matt@madison.systems>.
+Upstream-Status: Inappropriate [OE specific]
+
Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/go/internal/work/action.go | 3 +++
src/cmd/go/internal/work/build.go | 6 ++++++
@@ -28,10 +29,10 @@
3 files changed, 34 insertions(+)
diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
-index 8beb134..68a8cfe 100644
+index a59072e591..9e35ebde0c 100644
--- a/src/cmd/go/internal/work/action.go
+++ b/src/cmd/go/internal/work/action.go
-@@ -718,6 +718,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) {
+@@ -754,6 +754,9 @@ func (b *Builder) addTransitiveLinkDeps(a, a1 *Action, shlib string) {
if p1 == nil || p1.Shlib == "" || haveShlib[filepath.Base(p1.Shlib)] {
continue
}
@@ -42,10 +43,10 @@
// TODO(rsc): The use of ModeInstall here is suspect, but if we only do ModeBuild,
// we'll end up building an overall library or executable that depends at runtime
diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
-index 2f2860a..8cc6166 100644
+index 408edb5119..3d60252127 100644
--- a/src/cmd/go/internal/work/build.go
+++ b/src/cmd/go/internal/work/build.go
-@@ -217,6 +217,8 @@ See also: go install, go get, go clean.
+@@ -233,6 +233,8 @@ See also: go install, go get, go clean.
const concurrentGCBackendCompilationEnabledByDefault = true
@@ -54,7 +55,7 @@
func init() {
// break init cycle
CmdBuild.Run = runBuild
-@@ -230,6 +232,10 @@ func init() {
+@@ -246,6 +248,10 @@ func init() {
AddCoverFlags(CmdBuild, nil)
AddCoverFlags(CmdInstall, nil)
}
@@ -66,11 +67,11 @@
// Note that flags consulted by other parts of the code
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
-index 62e1774..cde867b 100644
+index 9724cd07d0..544df461a2 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
-@@ -546,6 +546,23 @@ func (b *Builder) build(ctx context.Context, a *Action) (err error) {
- return errors.New("cannot compile Go " + p.Module.GoVersion + " code")
+@@ -544,6 +544,23 @@ func (b *Builder) build(ctx context.Context, a *Action) (err error) {
+ return err
}
+ if goRootPrecious && (a.Package.Standard || a.Package.Goroot) {
@@ -90,10 +91,10 @@
+ }
+ }
+
- if err := b.Mkdir(a.Objdir); err != nil {
+ if err := sh.Mkdir(a.Objdir); err != nil {
return err
}
-@@ -1643,6 +1660,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) {
+@@ -1737,6 +1754,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) {
return err
}
@@ -105,9 +106,9 @@
+ }
+ }
+
- if err := b.Mkdir(a.Objdir); err != nil {
+ if err := b.Shell(a).Mkdir(a.Objdir); err != nil {
return err
}
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch b/poky/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch
index 7d9869b..35f3a98 100644
--- a/poky/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch
+++ b/poky/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch
@@ -1,4 +1,4 @@
-From 0ba747e6a4b251a0d9eed0cfd8f8c491bb508040 Mon Sep 17 00:00:00 2001
+From 619991feab04f331d081a91243434ccd859f611d Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 23 Nov 2020 19:22:04 +0000
Subject: [PATCH 7/9] exec.go: do not write linker flags into buildids
@@ -9,16 +9,18 @@
removing those known to be buildhost-specific.
Upstream-Status: Inappropriate [needs upstream discussion]
+
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/go/internal/work/exec.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
-index cde867b..5cb1812 100644
+index 544df461a2..75df5a4aa8 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
-@@ -1331,7 +1331,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID {
+@@ -1374,7 +1374,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID {
}
// Toolchain-dependent configuration, shared with b.linkSharedActionID.
@@ -27,7 +29,7 @@
// Input files.
for _, a1 := range a.Deps {
-@@ -1626,7 +1626,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID {
+@@ -1720,7 +1720,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID {
fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch)
// Toolchain-dependent configuration, shared with b.linkActionID.
@@ -37,5 +39,5 @@
// Input files.
for _, a1 := range a.Deps {
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch b/poky/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
index fe830ce..0662f66 100644
--- a/poky/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
+++ b/poky/meta/recipes-devtools/go/go/0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch
@@ -1,4 +1,4 @@
-From 1cbb416538a9c7c3fbedcb23f4d90d5c48becca8 Mon Sep 17 00:00:00 2001
+From e0999902687e2e394499f7153db8d62440c4dab0 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Tue, 10 Nov 2020 16:33:27 +0000
Subject: [PATCH 8/9] src/cmd/dist/buildgo.go: do not hardcode host compilers
@@ -8,16 +8,18 @@
additionally as they contain host specific paths, this helps reproducibility.
Upstream-Status: Inappropriate [needs upstream discussion]
+
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/dist/buildgo.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/cmd/dist/buildgo.go b/src/cmd/dist/buildgo.go
-index 29b0167..63a49f0 100644
+index 884e9d729a..2f52edacfe 100644
--- a/src/cmd/dist/buildgo.go
+++ b/src/cmd/dist/buildgo.go
-@@ -33,8 +33,8 @@ func mkzdefaultcc(dir, file string) {
+@@ -51,8 +51,8 @@ func mkzdefaultcc(dir, file string) {
fmt.Fprintf(&buf, "package cfg\n")
fmt.Fprintln(&buf)
fmt.Fprintf(&buf, "const DefaultPkgConfig = `%s`\n", defaultpkgconfig)
@@ -28,7 +30,7 @@
writefile(buf.String(), file, writeSkipSame)
return
}
-@@ -45,8 +45,8 @@ func mkzdefaultcc(dir, file string) {
+@@ -62,8 +62,8 @@ func mkzdefaultcc(dir, file string) {
fmt.Fprintf(&buf, "package main\n")
fmt.Fprintln(&buf)
fmt.Fprintf(&buf, "const defaultPkgConfig = `%s`\n", defaultpkgconfig)
@@ -40,5 +42,5 @@
}
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch b/poky/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch
index 49da5f6..cc45496 100644
--- a/poky/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch
+++ b/poky/meta/recipes-devtools/go/go/0009-go-Filter-build-paths-on-staticly-linked-arches.patch
@@ -1,4 +1,4 @@
-From 18011f72125bbea273d07ee5d792ac0ce6059572 Mon Sep 17 00:00:00 2001
+From 6c2438f187ca912c54a71b4ac65ab98999a019d2 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Sat, 2 Jul 2022 23:08:13 +0100
Subject: [PATCH 9/9] go: Filter build paths on staticly linked arches
@@ -11,17 +11,18 @@
Upstream-Status: Submitted [https://github.com/golang/go/pull/56410]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
src/cmd/go/internal/load/pkg.go | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
-index f427e29..6d6dc4e 100644
+index 1549800afb..f41fb2c4ef 100644
--- a/src/cmd/go/internal/load/pkg.go
+++ b/src/cmd/go/internal/load/pkg.go
-@@ -2270,6 +2270,17 @@ func (p *Package) collectDeps() {
- // to their VCS information (vcsStatusError).
- var vcsStatusCache par.Cache
+@@ -2277,6 +2277,17 @@ func appendBuildSetting(info *debug.BuildInfo, key, value string) {
+ info.Settings = append(info.Settings, debug.BuildSetting{Key: key, Value: value})
+ }
+func filterCompilerFlags(flags string) string {
+ var newflags []string
@@ -34,10 +35,10 @@
+ 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.
-@@ -2376,7 +2387,7 @@ func (p *Package) setBuildInfo(autoVCS bool) {
+ // setBuildInfo gathers build information and sets it into
+ // p.Internal.BuildInfo, which will later be formatted as a string and embedded
+ // in the binary. setBuildInfo should only be called on a main package with no
+@@ -2384,7 +2395,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) {
if gcflags := BuildGcflags.String(); gcflags != "" && cfg.BuildContext.Compiler == "gc" {
appendSetting("-gcflags", gcflags)
}
@@ -46,7 +47,7 @@
// https://go.dev/issue/52372: only include ldflags if -trimpath is not set,
// since it can include system paths through various linker flags (notably
// -extar, -extld, and -extldflags).
-@@ -2422,7 +2433,7 @@ func (p *Package) setBuildInfo(autoVCS bool) {
+@@ -2427,7 +2438,7 @@ func (p *Package) setBuildInfo(ctx context.Context, autoVCS bool) {
// subset of flags that are known not to be paths?
if cfg.BuildContext.CgoEnabled && !cfg.BuildTrimpath {
for _, name := range []string{"CGO_CFLAGS", "CGO_CPPFLAGS", "CGO_CXXFLAGS", "CGO_LDFLAGS"} {
@@ -56,5 +57,5 @@
}
appendSetting("GOARCH", cfg.BuildContext.GOARCH)
--
-2.30.2
+2.44.0
diff --git a/poky/meta/recipes-devtools/go/go_1.20.14.bb b/poky/meta/recipes-devtools/go/go_1.22.0.bb
similarity index 100%
rename from poky/meta/recipes-devtools/go/go_1.20.14.bb
rename to poky/meta/recipes-devtools/go/go_1.22.0.bb