diff options
author | Chee Yang Lee <chee.yang.lee@intel.com> | 2022-03-18 17:50:11 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-03 20:49:03 +0100 |
commit | c009c20ef2c4217921a439909c2a350097262c2f (patch) | |
tree | be3a83a289427eb4ea4d8c42d841c6d07b5d602a /meta/recipes-devtools/go/go-native_1.16.15.bb | |
parent | e3d1922620e2210998659e73a98a4122b4373688 (diff) | |
download | poky-c009c20ef2c4217921a439909c2a350097262c2f.tar.gz |
go: update to 1.16.15
go1.16.15 (released 2022-03-03) includes a security fix to the regexp/syntax package, as well as bug fixes to the compiler, runtime, the go command, and to the net package. See the Go 1.16.15 milestone on our issue tracker for detai
ls.
(From OE-Core rev: 3462c7680137a9ef5f683161d39caf19f87a932a)
Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go/go-native_1.16.15.bb')
-rw-r--r-- | meta/recipes-devtools/go/go-native_1.16.15.bb | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-native_1.16.15.bb b/meta/recipes-devtools/go/go-native_1.16.15.bb new file mode 100644 index 0000000000..f14892cdb0 --- /dev/null +++ b/meta/recipes-devtools/go/go-native_1.16.15.bb | |||
@@ -0,0 +1,59 @@ | |||
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 | |||
4 | require go-${PV}.inc | ||
5 | |||
6 | inherit native | ||
7 | |||
8 | SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4" | ||
9 | SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52" | ||
10 | |||
11 | export GOOS = "${BUILD_GOOS}" | ||
12 | export GOARCH = "${BUILD_GOARCH}" | ||
13 | CC = "${@d.getVar('BUILD_CC').strip()}" | ||
14 | |||
15 | GOMAKEARGS ?= "--no-banner" | ||
16 | |||
17 | do_configure() { | ||
18 | cd ${WORKDIR}/go1.4/go/src | ||
19 | CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash | ||
20 | } | ||
21 | |||
22 | do_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 | } | ||
30 | do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin" | ||
31 | do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin" | ||
32 | |||
33 | make_wrapper() { | ||
34 | rm -f ${D}${bindir}/$2$3 | ||
35 | cat <<END >${D}${bindir}/$2$3 | ||
36 | #!/bin/bash | ||
37 | here=\`dirname \$0\` | ||
38 | export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" | ||
39 | \$here/../lib/go/bin/$1 "\$@" | ||
40 | END | ||
41 | chmod +x ${D}${bindir}/$2 | ||
42 | } | ||
43 | |||
44 | do_install() { | ||
45 | install -d ${D}${libdir}/go | ||
46 | cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/ | ||
47 | install -d ${D}${libdir}/go/src | ||
48 | (cd ${S}/src; for d in *; do \ | ||
49 | [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ | ||
50 | done) | ||
51 | find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \; | ||
52 | install -d ${D}${bindir} ${D}${libdir}/go/bin | ||
53 | for f in ${B}/bin/* | ||
54 | do | ||
55 | base=`basename $f` | ||
56 | install -m755 $f ${D}${libdir}/go/bin | ||
57 | make_wrapper $base $base | ||
58 | done | ||
59 | } | ||