From 19e786b6fac8ecce6bb083db3dc9ff3ccc2584b2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 3 Sep 2020 19:23:47 -0700 Subject: 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 Signed-off-by: Richard Purdie --- .../recipes-devtools/go/go-binary-native_1.15.1.bb | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 meta/recipes-devtools/go/go-binary-native_1.15.1.bb (limited to 'meta/recipes-devtools/go/go-binary-native_1.15.1.bb') 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 @@ +# 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] = "70ac0dbf60a8ee9236f337ed0daa7a4c3b98f6186d4497826f68e97c0c0413f6" +SRC_URI[go_linux_arm64.sha256sum] = "ca21c771d906fbba8840b3a4831b1aa118f6e09b5d028323592faba382787a03" + +UPSTREAM_CHECK_URI = "https://golang.org/dl/" +UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux" + +S = "${WORKDIR}/go" + +inherit goarch native + +do_compile() { + : +} + +make_wrapper() { + rm -f ${D}${bindir}/$1 + cat <${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 +} -- cgit v1.2.3-54-g00ecf