From 1e03705deb10f089739bb8bd6db3d61e1ea8b5ac Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Mon, 9 Oct 2023 16:40:36 +0000 Subject: go: update 1.20.7 -> 1.20.8 Upgrade to latest 1.20.x release [1]: $ git log --oneline go1.20.7..go1.20.8 d5b8518043 (tag: go1.20.8) [release-branch.go1.20] go1.20.8 2070531d2f [release-branch.go1.20] html/template: properly handle special tags within the script context 023b542edf [release-branch.go1.20] html/template: support HTML-like comments in script contexts 612da32fb5 [release-branch.go1.20] cmd/compile: in expandCalls, move all arg marshalling into call block f0b8768dbc [release-branch.go1.20] path/filepath: don't drop .. elements when cleaning invalid Windows paths b463668275 [release-branch.go1.20] runtime: profiling on Darwin cannot use blocking reads 974a3c9af7 [release-branch.go1.20] go/types, types2: don't panic during interface completion 14e3c7338d [release-branch.go1.20] cmd/api: rename api.go to main_test.go 095cfba86b [release-branch.go1.20] crypto/tls: add GODEBUG to control max RSA key size 1a91bb94b0 [release-branch.go1.20] cmd/go: do not index std as a module in modcache ede3e278ae [release-branch.go1.20] net/http: permit requests with invalid Host headers 201f8b40dc [release-branch.go1.20] cmd/go: refuse to build Go 1.22 code [1] https://github.com/golang/go/compare/go1.20.7...go1.20.8 (From OE-Core rev: 25d0870ae045a6f7845ebc905f2d6602a2ce854d) Signed-off-by: Jose Quaresma Signed-off-by: Richard Purdie --- meta/recipes-devtools/go/go-1.20.7.inc | 18 ------- meta/recipes-devtools/go/go-1.20.8.inc | 18 +++++++ .../recipes-devtools/go/go-binary-native_1.20.7.bb | 50 ------------------- .../recipes-devtools/go/go-binary-native_1.20.8.bb | 50 +++++++++++++++++++ .../go/go-cross-canadian_1.20.7.bb | 2 - .../go/go-cross-canadian_1.20.8.bb | 2 + meta/recipes-devtools/go/go-cross_1.20.7.bb | 2 - meta/recipes-devtools/go/go-cross_1.20.8.bb | 2 + meta/recipes-devtools/go/go-crosssdk_1.20.7.bb | 2 - meta/recipes-devtools/go/go-crosssdk_1.20.8.bb | 2 + meta/recipes-devtools/go/go-native_1.20.7.bb | 58 ---------------------- meta/recipes-devtools/go/go-native_1.20.8.bb | 58 ++++++++++++++++++++++ meta/recipes-devtools/go/go-runtime_1.20.7.bb | 3 -- meta/recipes-devtools/go/go-runtime_1.20.8.bb | 3 ++ ...-content-based-hash-generation-less-pedan.patch | 10 ++-- .../0003-ld-add-soname-to-shareable-objects.patch | 8 +-- ...06-cmd-go-make-GOROOT-precious-by-default.patch | 8 +-- ...o-do-not-write-linker-flags-into-buildids.patch | 6 +-- ...ter-build-paths-on-staticly-linked-arches.patch | 8 +-- meta/recipes-devtools/go/go_1.20.7.bb | 18 ------- meta/recipes-devtools/go/go_1.20.8.bb | 18 +++++++ 21 files changed, 173 insertions(+), 173 deletions(-) delete mode 100644 meta/recipes-devtools/go/go-1.20.7.inc create mode 100644 meta/recipes-devtools/go/go-1.20.8.inc delete mode 100644 meta/recipes-devtools/go/go-binary-native_1.20.7.bb create mode 100644 meta/recipes-devtools/go/go-binary-native_1.20.8.bb delete mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.20.7.bb create mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.20.8.bb delete mode 100644 meta/recipes-devtools/go/go-cross_1.20.7.bb create mode 100644 meta/recipes-devtools/go/go-cross_1.20.8.bb delete mode 100644 meta/recipes-devtools/go/go-crosssdk_1.20.7.bb create mode 100644 meta/recipes-devtools/go/go-crosssdk_1.20.8.bb delete mode 100644 meta/recipes-devtools/go/go-native_1.20.7.bb create mode 100644 meta/recipes-devtools/go/go-native_1.20.8.bb delete mode 100644 meta/recipes-devtools/go/go-runtime_1.20.7.bb create mode 100644 meta/recipes-devtools/go/go-runtime_1.20.8.bb delete mode 100644 meta/recipes-devtools/go/go_1.20.7.bb create mode 100644 meta/recipes-devtools/go/go_1.20.8.bb diff --git a/meta/recipes-devtools/go/go-1.20.7.inc b/meta/recipes-devtools/go/go-1.20.7.inc deleted file mode 100644 index f7974367cc..0000000000 --- a/meta/recipes-devtools/go/go-1.20.7.inc +++ /dev/null @@ -1,18 +0,0 @@ -require go-common.inc - -FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go:" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" - -SRC_URI += "\ - file://0001-cmd-go-make-content-based-hash-generation-less-pedan.patch \ - file://0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch \ - file://0003-ld-add-soname-to-shareable-objects.patch \ - 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 \ -" -SRC_URI[main.sha256sum] = "2c5ee9c9ec1e733b0dbbc2bdfed3f62306e51d8172bf38f4f4e542b27520f597" diff --git a/meta/recipes-devtools/go/go-1.20.8.inc b/meta/recipes-devtools/go/go-1.20.8.inc new file mode 100644 index 0000000000..958d751323 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.20.8.inc @@ -0,0 +1,18 @@ +require go-common.inc + +FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go:" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" + +SRC_URI += "\ + file://0001-cmd-go-make-content-based-hash-generation-less-pedan.patch \ + file://0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch \ + file://0003-ld-add-soname-to-shareable-objects.patch \ + 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 \ +" +SRC_URI[main.sha256sum] = "38d71714fa5279f97240451956d8e47e3c1b6a5de7cb84137949d62b5dd3182e" diff --git a/meta/recipes-devtools/go/go-binary-native_1.20.7.bb b/meta/recipes-devtools/go/go-binary-native_1.20.7.bb deleted file mode 100644 index 3decde1954..0000000000 --- a/meta/recipes-devtools/go/go-binary-native_1.20.7.bb +++ /dev/null @@ -1,50 +0,0 @@ -# This recipe is for bootstrapping our go-cross from a prebuilt binary of Go from golang.org. - -SUMMARY = "Go programming language compiler (upstream binary for bootstrap)" -HOMEPAGE = " http://golang.org/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" - -PROVIDES = "go-native" - -# 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] = "f0a87f1bcae91c4b69f8dc2bc6d7e6bfcd7524fceec130af525058c0c17b1b44" -SRC_URI[go_linux_arm64.sha256sum] = "44781ae3b153c3b07651d93b6bc554e835a36e2d72a696281c1e4dad9efffe43" -SRC_URI[go_linux_ppc64le.sha256sum] = "6318a1db307c12b8afe68808bd6fae4fba1e558a85b958216096869ed506dcb3" - -UPSTREAM_CHECK_URI = "https://golang.org/dl/" -UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux" - -CVE_PRODUCT = "go" - -S = "${WORKDIR}/go" - -inherit goarch native - -do_compile() { - : -} - -make_wrapper() { - rm -f ${D}${bindir}/$1 - cat <${D}${bindir}/$1 -#!/bin/bash -here=\`dirname \$0\` -export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" -\$here/../lib/go/bin/$1 "\$@" -END - chmod +x ${D}${bindir}/$1 -} - -do_install() { - find ${S} -depth -type d -name testdata -exec rm -rf {} + - - install -d ${D}${bindir} ${D}${libdir}/go - cp --preserve=mode,timestamps -R ${S}/ ${D}${libdir}/ - - for f in ${S}/bin/* - do - make_wrapper `basename $f` - done -} diff --git a/meta/recipes-devtools/go/go-binary-native_1.20.8.bb b/meta/recipes-devtools/go/go-binary-native_1.20.8.bb new file mode 100644 index 0000000000..cd6dbcb5e9 --- /dev/null +++ b/meta/recipes-devtools/go/go-binary-native_1.20.8.bb @@ -0,0 +1,50 @@ +# This recipe is for bootstrapping our go-cross from a prebuilt binary of Go from golang.org. + +SUMMARY = "Go programming language compiler (upstream binary for bootstrap)" +HOMEPAGE = " http://golang.org/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" + +PROVIDES = "go-native" + +# 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] = "cc97c28d9c252fbf28f91950d830201aa403836cbed702a05932e63f7f0c7bc4" +SRC_URI[go_linux_arm64.sha256sum] = "15ab379c6a2b0d086fe3e74be4599420e66549edf7426a300ee0f3809500f89e" +SRC_URI[go_linux_ppc64le.sha256sum] = "a5034a9c7eac6c5bcc650c2605c5edb4039c7b6064e2a2ea43c415c8af91f5f6" + +UPSTREAM_CHECK_URI = "https://golang.org/dl/" +UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux" + +CVE_PRODUCT = "go" + +S = "${WORKDIR}/go" + +inherit goarch native + +do_compile() { + : +} + +make_wrapper() { + rm -f ${D}${bindir}/$1 + cat <${D}${bindir}/$1 +#!/bin/bash +here=\`dirname \$0\` +export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" +\$here/../lib/go/bin/$1 "\$@" +END + chmod +x ${D}${bindir}/$1 +} + +do_install() { + find ${S} -depth -type d -name testdata -exec rm -rf {} + + + install -d ${D}${bindir} ${D}${libdir}/go + cp --preserve=mode,timestamps -R ${S}/ ${D}${libdir}/ + + for f in ${S}/bin/* + do + make_wrapper `basename $f` + done +} diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.20.7.bb b/meta/recipes-devtools/go/go-cross-canadian_1.20.7.bb deleted file mode 100644 index 7ac9449e47..0000000000 --- a/meta/recipes-devtools/go/go-cross-canadian_1.20.7.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-cross-canadian.inc -require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.20.8.bb b/meta/recipes-devtools/go/go-cross-canadian_1.20.8.bb new file mode 100644 index 0000000000..7ac9449e47 --- /dev/null +++ b/meta/recipes-devtools/go/go-cross-canadian_1.20.8.bb @@ -0,0 +1,2 @@ +require go-cross-canadian.inc +require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-cross_1.20.7.bb b/meta/recipes-devtools/go/go-cross_1.20.7.bb deleted file mode 100644 index 80b5a03f6c..0000000000 --- a/meta/recipes-devtools/go/go-cross_1.20.7.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-cross.inc -require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-cross_1.20.8.bb b/meta/recipes-devtools/go/go-cross_1.20.8.bb new file mode 100644 index 0000000000..80b5a03f6c --- /dev/null +++ b/meta/recipes-devtools/go/go-cross_1.20.8.bb @@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-crosssdk_1.20.7.bb b/meta/recipes-devtools/go/go-crosssdk_1.20.7.bb deleted file mode 100644 index 1857c8a577..0000000000 --- a/meta/recipes-devtools/go/go-crosssdk_1.20.7.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-crosssdk.inc -require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-crosssdk_1.20.8.bb b/meta/recipes-devtools/go/go-crosssdk_1.20.8.bb new file mode 100644 index 0000000000..1857c8a577 --- /dev/null +++ b/meta/recipes-devtools/go/go-crosssdk_1.20.8.bb @@ -0,0 +1,2 @@ +require go-crosssdk.inc +require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-native_1.20.7.bb b/meta/recipes-devtools/go/go-native_1.20.7.bb deleted file mode 100644 index ddf25b2c9b..0000000000 --- a/meta/recipes-devtools/go/go-native_1.20.7.bb +++ /dev/null @@ -1,58 +0,0 @@ -# This recipe builds a native Go (written in Go) by first building an old Go 1.4 -# (written in C). However this old Go does not support all hosts platforms. - -require go-${PV}.inc - -inherit native - -SRC_URI += "https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4" -SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52" - -export GOOS = "${BUILD_GOOS}" -export GOARCH = "${BUILD_GOARCH}" -CC = "${@d.getVar('BUILD_CC').strip()}" - -GOMAKEARGS ?= "--no-banner" - -do_configure() { - cd ${WORKDIR}/go1.4/go/src - CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash -} - -do_compile() { - export GOROOT_FINAL="${libdir_native}/go" - export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go" - - cd src - ./make.bash ${GOMAKEARGS} - cd ${B} -} -do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin" - -make_wrapper() { - rm -f ${D}${bindir}/$2$3 - cat <${D}${bindir}/$2$3 -#!/bin/bash -here=\`dirname \$0\` -export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" -\$here/../lib/go/bin/$1 "\$@" -END - chmod +x ${D}${bindir}/$2 -} - -do_install() { - install -d ${D}${libdir}/go - cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/ - install -d ${D}${libdir}/go/src - (cd ${S}/src; for d in *; do \ - [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ - done) - find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \; - install -d ${D}${bindir} ${D}${libdir}/go/bin - for f in ${B}/bin/* - do - base=`basename $f` - install -m755 $f ${D}${libdir}/go/bin - make_wrapper $base $base - done -} diff --git a/meta/recipes-devtools/go/go-native_1.20.8.bb b/meta/recipes-devtools/go/go-native_1.20.8.bb new file mode 100644 index 0000000000..ddf25b2c9b --- /dev/null +++ b/meta/recipes-devtools/go/go-native_1.20.8.bb @@ -0,0 +1,58 @@ +# This recipe builds a native Go (written in Go) by first building an old Go 1.4 +# (written in C). However this old Go does not support all hosts platforms. + +require go-${PV}.inc + +inherit native + +SRC_URI += "https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4" +SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52" + +export GOOS = "${BUILD_GOOS}" +export GOARCH = "${BUILD_GOARCH}" +CC = "${@d.getVar('BUILD_CC').strip()}" + +GOMAKEARGS ?= "--no-banner" + +do_configure() { + cd ${WORKDIR}/go1.4/go/src + CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash +} + +do_compile() { + export GOROOT_FINAL="${libdir_native}/go" + export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go" + + cd src + ./make.bash ${GOMAKEARGS} + cd ${B} +} +do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin" + +make_wrapper() { + rm -f ${D}${bindir}/$2$3 + cat <${D}${bindir}/$2$3 +#!/bin/bash +here=\`dirname \$0\` +export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" +\$here/../lib/go/bin/$1 "\$@" +END + chmod +x ${D}${bindir}/$2 +} + +do_install() { + install -d ${D}${libdir}/go + cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/ + install -d ${D}${libdir}/go/src + (cd ${S}/src; for d in *; do \ + [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ + done) + find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \; + install -d ${D}${bindir} ${D}${libdir}/go/bin + for f in ${B}/bin/* + do + base=`basename $f` + install -m755 $f ${D}${libdir}/go/bin + make_wrapper $base $base + done +} diff --git a/meta/recipes-devtools/go/go-runtime_1.20.7.bb b/meta/recipes-devtools/go/go-runtime_1.20.7.bb deleted file mode 100644 index 63464a1501..0000000000 --- a/meta/recipes-devtools/go/go-runtime_1.20.7.bb +++ /dev/null @@ -1,3 +0,0 @@ -require go-${PV}.inc -require go-runtime.inc - diff --git a/meta/recipes-devtools/go/go-runtime_1.20.8.bb b/meta/recipes-devtools/go/go-runtime_1.20.8.bb new file mode 100644 index 0000000000..63464a1501 --- /dev/null +++ b/meta/recipes-devtools/go/go-runtime_1.20.8.bb @@ -0,0 +1,3 @@ +require go-${PV}.inc +require go-runtime.inc + 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 56487e34e3..9a2551031a 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 @@ -44,7 +44,7 @@ index 66ef5ce..fb7448a 100644 // 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 d6fa847..7e4fcb3 100644 +index 67d1193..62e1774 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) { @@ -103,7 +103,7 @@ index d6fa847..7e4fcb3 100644 } // Configuration specific to compiler toolchain. -@@ -2970,8 +2972,25 @@ func envList(key, def string) []string { +@@ -2989,8 +2991,25 @@ func envList(key, def string) []string { return args } @@ -130,7 +130,7 @@ index d6fa847..7e4fcb3 100644 if cppflags, err = buildFlags("CPPFLAGS", "", p.CgoCPPFLAGS, checkCompilerFlags); err != nil { return } -@@ -2987,6 +3006,13 @@ func (b *Builder) CFlags(p *load.Package) (cppflags, cflags, cxxflags, fflags, l +@@ -3006,6 +3025,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,7 +144,7 @@ index d6fa847..7e4fcb3 100644 return } -@@ -3002,7 +3028,7 @@ var cgoRe = lazyregexp.New(`[/\\:]`) +@@ -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) { p := a.Package @@ -153,7 +153,7 @@ index d6fa847..7e4fcb3 100644 if err != nil { return nil, nil, err } -@@ -3510,7 +3536,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) { +@@ -3577,7 +3603,7 @@ func (b *Builder) swigIntSize(objdir string) (intsize string, err error) { // 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) { 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 2bc7d194bb..ced0be1998 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 @@ -18,10 +18,10 @@ Signed-off-by: Alexander J Kube 1 file changed, 3 insertions(+) diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index c073017..e60d39a 100644 +index 03b9f11..e91c92f 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go -@@ -1491,6 +1491,7 @@ func (ctxt *Link) hostlink() { +@@ -1504,6 +1504,7 @@ func (ctxt *Link) hostlink() { argv = append(argv, "-Wl,-z,relro") } argv = append(argv, "-shared") @@ -29,7 +29,7 @@ index c073017..e60d39a 100644 if ctxt.HeadType == objabi.Hwindows { argv = addASLRargs(argv, *flagAslr) } else { -@@ -1506,6 +1507,7 @@ func (ctxt *Link) hostlink() { +@@ -1519,6 +1520,7 @@ func (ctxt *Link) hostlink() { argv = append(argv, "-Wl,-z,relro") } argv = append(argv, "-shared") @@ -37,7 +37,7 @@ index c073017..e60d39a 100644 case BuildModePlugin: if ctxt.HeadType == objabi.Hdarwin { argv = append(argv, "-dynamiclib") -@@ -1514,6 +1516,7 @@ func (ctxt *Link) hostlink() { +@@ -1527,6 +1529,7 @@ func (ctxt *Link) hostlink() { argv = append(argv, "-Wl,-z,relro") } argv = append(argv, "-shared") 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 38b28b9877..520e41da86 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 @@ -66,11 +66,11 @@ index 2f2860a..8cc6166 100644 // 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 7e4fcb3..d83b31b 100644 +index 62e1774..cde867b 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go -@@ -527,6 +527,23 @@ func (b *Builder) build(ctx context.Context, a *Action) (err error) { - return errors.New("binary-only packages are no longer supported") +@@ -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") } + if goRootPrecious && (a.Package.Standard || a.Package.Goroot) { @@ -93,7 +93,7 @@ index 7e4fcb3..d83b31b 100644 if err := b.Mkdir(a.Objdir); err != nil { return err } -@@ -1624,6 +1641,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) { +@@ -1643,6 +1660,14 @@ func (b *Builder) linkShared(ctx context.Context, a *Action) (err error) { return err } diff --git a/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch b/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch index a821cf02fc..7d9869b536 100644 --- a/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch +++ b/meta/recipes-devtools/go/go/0007-exec.go-do-not-write-linker-flags-into-buildids.patch @@ -15,10 +15,10 @@ Signed-off-by: Alexander Kanavin 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 d83b31b..a646fbb 100644 +index cde867b..5cb1812 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go -@@ -1312,7 +1312,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID { +@@ -1331,7 +1331,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID { } // Toolchain-dependent configuration, shared with b.linkSharedActionID. @@ -27,7 +27,7 @@ index d83b31b..a646fbb 100644 // Input files. for _, a1 := range a.Deps { -@@ -1607,7 +1607,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID { +@@ -1626,7 +1626,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. 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 705c922141..49da5f6297 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 @@ -16,10 +16,10 @@ Signed-off-by: Richard Purdie 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 56a4e5e..22edbdb 100644 +index f427e29..6d6dc4e 100644 --- a/src/cmd/go/internal/load/pkg.go +++ b/src/cmd/go/internal/load/pkg.go -@@ -2266,6 +2266,17 @@ func (p *Package) collectDeps() { +@@ -2270,6 +2270,17 @@ func (p *Package) collectDeps() { // to their VCS information (vcsStatusError). var vcsStatusCache par.Cache @@ -37,7 +37,7 @@ index 56a4e5e..22edbdb 100644 // 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. -@@ -2372,7 +2383,7 @@ func (p *Package) setBuildInfo(autoVCS bool) { +@@ -2376,7 +2387,7 @@ func (p *Package) setBuildInfo(autoVCS bool) { if gcflags := BuildGcflags.String(); gcflags != "" && cfg.BuildContext.Compiler == "gc" { appendSetting("-gcflags", gcflags) } @@ -46,7 +46,7 @@ index 56a4e5e..22edbdb 100644 // 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). -@@ -2418,7 +2429,7 @@ func (p *Package) setBuildInfo(autoVCS bool) { +@@ -2422,7 +2433,7 @@ func (p *Package) setBuildInfo(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"} { diff --git a/meta/recipes-devtools/go/go_1.20.7.bb b/meta/recipes-devtools/go/go_1.20.7.bb deleted file mode 100644 index 46f5fbc6be..0000000000 --- a/meta/recipes-devtools/go/go_1.20.7.bb +++ /dev/null @@ -1,18 +0,0 @@ -require go-${PV}.inc -require go-target.inc - -inherit linuxloader - -CGO_LDFLAGS:append = " -no-pie" - -export GO_LDSO = "${@get_linuxloader(d)}" -export CC_FOR_TARGET = "gcc" -export CXX_FOR_TARGET = "g++" - -# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its -# variants. -python() { - if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'): - d.appendVar('INSANE_SKIP:%s' % d.getVar('PN'), " textrel") -} - diff --git a/meta/recipes-devtools/go/go_1.20.8.bb b/meta/recipes-devtools/go/go_1.20.8.bb new file mode 100644 index 0000000000..46f5fbc6be --- /dev/null +++ b/meta/recipes-devtools/go/go_1.20.8.bb @@ -0,0 +1,18 @@ +require go-${PV}.inc +require go-target.inc + +inherit linuxloader + +CGO_LDFLAGS:append = " -no-pie" + +export GO_LDSO = "${@get_linuxloader(d)}" +export CC_FOR_TARGET = "gcc" +export CXX_FOR_TARGET = "g++" + +# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its +# variants. +python() { + if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'): + d.appendVar('INSANE_SKIP:%s' % d.getVar('PN'), " textrel") +} + -- cgit v1.2.3-54-g00ecf