summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-native_1.19.4.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-02-10 07:42:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-15 10:21:34 +0000
commit19b53dc47f2b8aaf8ef171213876db2095eb6211 (patch)
tree5406c6622af0d8cbcd703a0aaf585d4e6b3dd6e6 /meta/recipes-devtools/go/go-native_1.19.4.bb
parent4322056708873dd32bdad062079fecddaf538d9d (diff)
downloadpoky-19b53dc47f2b8aaf8ef171213876db2095eb6211.tar.gz
go: update 1.19.4 -> 1.20
No longer package go-runtime-staticdev into sdk packagegroup, as go-runtime 1.20 doesn't build the static bits anymore (possibly can be enabled via build config, if proven necessary). (From OE-Core rev: e8ab9d303a6fca3806097f1fd360efe8f8ae0c1d) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go/go-native_1.19.4.bb')
-rw-r--r--meta/recipes-devtools/go/go-native_1.19.4.bb58
1 files changed, 0 insertions, 58 deletions
diff --git a/meta/recipes-devtools/go/go-native_1.19.4.bb b/meta/recipes-devtools/go/go-native_1.19.4.bb
deleted file mode 100644
index ddf25b2c9b..0000000000
--- a/meta/recipes-devtools/go/go-native_1.19.4.bb
+++ /dev/null
@@ -1,58 +0,0 @@
1# This recipe builds a native Go (written in Go) by first building an old Go 1.4
2# (written in C). However this old Go does not support all hosts platforms.
3
4require go-${PV}.inc
5
6inherit native
7
8SRC_URI += "https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
9SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
10
11export GOOS = "${BUILD_GOOS}"
12export GOARCH = "${BUILD_GOARCH}"
13CC = "${@d.getVar('BUILD_CC').strip()}"
14
15GOMAKEARGS ?= "--no-banner"
16
17do_configure() {
18 cd ${WORKDIR}/go1.4/go/src
19 CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
20}
21
22do_compile() {
23 export GOROOT_FINAL="${libdir_native}/go"
24 export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go"
25
26 cd src
27 ./make.bash ${GOMAKEARGS}
28 cd ${B}
29}
30do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin"
31
32make_wrapper() {
33 rm -f ${D}${bindir}/$2$3
34 cat <<END >${D}${bindir}/$2$3
35#!/bin/bash
36here=\`dirname \$0\`
37export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
38\$here/../lib/go/bin/$1 "\$@"
39END
40 chmod +x ${D}${bindir}/$2
41}
42
43do_install() {
44 install -d ${D}${libdir}/go
45 cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
46 install -d ${D}${libdir}/go/src
47 (cd ${S}/src; for d in *; do \
48 [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
49 done)
50 find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
51 install -d ${D}${bindir} ${D}${libdir}/go/bin
52 for f in ${B}/bin/*
53 do
54 base=`basename $f`
55 install -m755 $f ${D}${libdir}/go/bin
56 make_wrapper $base $base
57 done
58}