summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-binary-native_1.15.2.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-09-13 22:19:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-14 22:42:27 +0100
commit0783a84a6b0df84be590f59e70cb80506c774f4d (patch)
tree0adca1a07bb67a90d56fad80e4fca1badb9c2d2b /meta/recipes-devtools/go/go-binary-native_1.15.2.bb
parentd88e83d49478a2535575df769329d9b1e6579564 (diff)
downloadopenembedded-core-contrib-0783a84a6b0df84be590f59e70cb80506c774f4d.tar.gz
go: Update to 1.15.2 minor release
This is bug fix release on 1.15 stable version 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.2.bb')
-rw-r--r--meta/recipes-devtools/go/go-binary-native_1.15.2.bb46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-binary-native_1.15.2.bb b/meta/recipes-devtools/go/go-binary-native_1.15.2.bb
new file mode 100644
index 0000000000..ccd2d5ebad
--- /dev/null
+++ b/meta/recipes-devtools/go/go-binary-native_1.15.2.bb
@@ -0,0 +1,46 @@
+# This recipe is for bootstrapping our go-cross from a prebuilt binary of Go from golang.org.
+
+SUMMARY = "Go programming language compiler (upstream binary for bootstrap)"
+HOMEPAGE = " http://golang.org/"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
+
+PROVIDES = "go-native"
+
+SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
+SRC_URI[go_linux_amd64.sha256sum] = "b49fda1ca29a1946d6bb2a5a6982cf07ccd2aba849289508ee0f9918f6bb4552"
+SRC_URI[go_linux_arm64.sha256sum] = "c8ec460cc82d61604b048f9439c06bd591722efce5cd48f49e19b5f6226bd36d"
+
+UPSTREAM_CHECK_URI = "https://golang.org/dl/"
+UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
+
+S = "${WORKDIR}/go"
+
+inherit goarch native
+
+do_compile() {
+ :
+}
+
+make_wrapper() {
+ rm -f ${D}${bindir}/$1
+ cat <<END >${D}${bindir}/$1
+#!/bin/bash
+here=\`dirname \$0\`
+export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}"
+\$here/../lib/go/bin/$1 "\$@"
+END
+ chmod +x ${D}${bindir}/$1
+}
+
+do_install() {
+ find ${S} -depth -type d -name testdata -exec rm -rf {} +
+
+ install -d ${D}${bindir} ${D}${libdir}/go
+ cp --preserve=mode,timestamps -R ${S}/ ${D}${libdir}/
+
+ for f in ${S}/bin/*
+ do
+ make_wrapper `basename $f`
+ done
+}