mirror of
https://git.yoctoproject.org/poky
synced 2026-04-25 15:32:13 +02:00
Upgrade to latest 1.20.x release [1]: $ git log --oneline go1.20.11..go1.20.12 97c8ff8d53 (tag: go1.20.12, origin/release-branch.go1.20) [release-branch.go1.20] go1.20.12 6446af942e [release-branch.go1.20] net/http: limit chunked data overhead 77397ffcb2 [release-branch.go1.20] crypto/rand,runtime: revert "switch RtlGenRandom for ProcessPrng" d77307f855 [release-branch.go1.20] cmd/compile: fix findIndVar so it does not match disjointed loop headers 1bd76576fe [release-branch.go1.20] crypto/rand,runtime: switch RtlGenRandom for ProcessPrng 1b59b017db [release-branch.go1.20] path/filepath: consider \\?\c: as a volume on Windows 46bc33819a [release-branch.go1.20] cmd/go/internal/vcs: error out if the requested repo does not support a secure protocol e1dc209be8 [release-branch.go1.20] cmd/go/internal/modfetch/codehost: set core.longpaths in Git repos on Windows [1] https://github.com/golang/go/compare/go1.20.11...go1.20.12 (From OE-Core rev: 3e7981c7e575b0e16a7b7aba47993e9c58a719c5) 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> (cherry picked from commit 8515842b5c503b9a8840675d9cbcfe147d25c1d4) Signed-off-by: Steve Sakoman <steve@sakoman.com>
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
|
|
}
|