summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-binary-native_1.15.1.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-09-03 19:23:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-05 22:19:20 +0100
commit19e786b6fac8ecce6bb083db3dc9ff3ccc2584b2 (patch)
treeffc152bbad1291d0916d7dbe680aeb3c3e67377b /meta/recipes-devtools/go/go-binary-native_1.15.1.bb
parentd567c995c3b3aa844e20b5117d54c71d2987d8f2 (diff)
downloadpoky-19e786b6fac8ecce6bb083db3dc9ff3ccc2584b2.tar.gz
go: Upgrade to 1.15 major release
1.15 is latest major release changelog is [1] and detailed blog is [2] Drop hardcoding ldso patch in favor of setting it using GO_LDSO variable which can be defined in terms of linuxloader defined by OE Setting GOBUILDMODE to pie is no longer needed [1] https://golang.org/doc/go1.15 [2] https://blog.golang.org/go1.15 (From OE-Core rev: aa1bfaff4adc9246a2d65592b3a8061d55829086) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go/go-binary-native_1.15.1.bb')
-rw-r--r--meta/recipes-devtools/go/go-binary-native_1.15.1.bb46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-binary-native_1.15.1.bb b/meta/recipes-devtools/go/go-binary-native_1.15.1.bb
new file mode 100644
index 0000000000..a4eca7f4c1
--- /dev/null
+++ b/meta/recipes-devtools/go/go-binary-native_1.15.1.bb
@@ -0,0 +1,46 @@
1# This recipe is for bootstrapping our go-cross from a prebuilt binary of Go from golang.org.
2
3SUMMARY = "Go programming language compiler (upstream binary for bootstrap)"
4HOMEPAGE = " http://golang.org/"
5LICENSE = "BSD-3-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
7
8PROVIDES = "go-native"
9
10SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
11SRC_URI[go_linux_amd64.sha256sum] = "70ac0dbf60a8ee9236f337ed0daa7a4c3b98f6186d4497826f68e97c0c0413f6"
12SRC_URI[go_linux_arm64.sha256sum] = "ca21c771d906fbba8840b3a4831b1aa118f6e09b5d028323592faba382787a03"
13
14UPSTREAM_CHECK_URI = "https://golang.org/dl/"
15UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
16
17S = "${WORKDIR}/go"
18
19inherit goarch native
20
21do_compile() {
22 :
23}
24
25make_wrapper() {
26 rm -f ${D}${bindir}/$1
27 cat <<END >${D}${bindir}/$1
28#!/bin/bash
29here=\`dirname \$0\`
30export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
31\$here/../lib/go/bin/$1 "\$@"
32END
33 chmod +x ${D}${bindir}/$1
34}
35
36do_install() {
37 find ${S} -depth -type d -name testdata -exec rm -rf {} +
38
39 install -d ${D}${bindir} ${D}${libdir}/go
40 cp --preserve=mode,timestamps -R ${S}/ ${D}${libdir}/
41
42 for f in ${S}/bin/*
43 do
44 make_wrapper `basename $f`
45 done
46}