mirror of
https://git.yoctoproject.org/poky
synced 2026-04-25 06:32:12 +02:00
Upgrade to latest 1.20.x release [1]: $ git log --oneline go1.20.5..go1.20.6 origin/release-branch.go1.20 2c358ffe97 (tag: go1.20.6, origin/release-branch.go1.20) [release-branch.go1.20] go1.20.6 312920c00a [release-branch.go1.20] net/http: validate Host header before sending 4db13d762b [release-branch.go1.20] runtime: set raceignore to zero when starting a new goroutine 08a58dd8b6 [release-branch.go1.20] runtime: allow for 5 more threads in TestWindowsStackMemory* 65092835c5 [release-branch.go1.20] cmd/go: skip TestScript/gccgo_link_ldflags on aix/ppc64 bca817594c [release-branch.go1.20] crypto/x509: tolerate multiple matching chains in testVerify b8e67d1ddd [release-branch.go1.20] cmd/go/internal/test: don't wait for previous test actions when interrupted 3db4f8146c [release-branch.go1.20] runtime: resolve checkdead panic by refining `startm` lock handling in caller context 6b45fb7b73 [release-branch.go1.20] runtime: fallback to TEB arbitrary pointer when TLS slots are full be30960e58 [release-branch.go1.20] runtime: use 1-byte load for address checking in racecallatomic b59efe6c34 [release-branch.go1.20] net/mail: permit more characters in mail headers c32f1afb41 [release-branch.go1.20] all: make safe for new vet analyzer c7b145655b [release-branch.go1.20] cmd/go: fix tests for new builder environment 03063101a2 [release-branch.go1.20] text/template: set variables correctly in range assignment d51e322a3f [release-branch.go1.20] go/printer: error out of Fprint when it would write a '//line' directive with a multiline file path 49594244d3 [release-branch.go1.20] cmd/cover: error out if a requested source file contains a newline 4719048211 [release-branch.go1.20] cmd/cgo: error out if the source path used in line directives would contain a newline 6c606fc191 [release-branch.go1.20] cmd/go: fix TestScript/build_cwd_newline with CGO_ENABLED=0 63ad2b5811 [release-branch.go1.20] cmd/compile: do not report division by error during typecheck 95f377daad [release-branch.go1.20] cmd/go: retain extra roots to disambiguate imports in 'go mod tidy' a7a48fad7e [release-branch.go1.20] crypto/ecdsa: properly truncate P-521 hashes f5172dcd38 [release-branch.go1.20] go/build: check for invalid import paths again 8b3acefcbe [release-branch.go1.20] cmd/go: omit checksums for go.mod files needed for go version lines more often in pre-1.21 modules 1008486a9f [release-branch.go1.20] cmd/cgo: correct _cgo_flags output [1] https://github.com/golang/go/compare/go1.20.5...go1.20.6 (From OE-Core rev: 8d8216d8c4d37cc0d9508eb644653f94fff8989c) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
59 lines
1.5 KiB
BlitzBasic
59 lines
1.5 KiB
BlitzBasic
# 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 <<END >${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
|
|
}
|