summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-native.inc
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2018-03-04 13:09:25 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:36:32 -0800
commit4fd749ca6450a4870be1c1e13802f084b6eb0db6 (patch)
tree97b4a5951489fc6774c89da6bf028e9b0717bc38 /meta/recipes-devtools/go/go-native.inc
parent064900f87a179a1e5b37dfc9313baab6351e7875 (diff)
downloadopenembedded-core-contrib-4fd749ca6450a4870be1c1e13802f084b6eb0db6.tar.gz
go: update go 1.9 -> go 1.10
* Patches and recipes reworked for go 1.10's significant changes to its bootstrap and build steps. * Update go1.4 source tarball used for go-native bootstrapping to the version recommended in the current go documentation * Remove test data from installed sources to eliminate some packaging QA warnings * Set GOCACHE to 'off' to disable 1.10's build caching in the go recipes and bbclass * Update go_do_compile to compile both static and dynamic objects dynamic linking is in use, since go1.10's build tool is pickier about this Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/go/go-native.inc')
-rw-r--r--meta/recipes-devtools/go/go-native.inc26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/recipes-devtools/go/go-native.inc b/meta/recipes-devtools/go/go-native.inc
index 95db1c2b7c..35561768df 100644
--- a/meta/recipes-devtools/go/go-native.inc
+++ b/meta/recipes-devtools/go/go-native.inc
@@ -4,34 +4,34 @@ nonstaging_libdir := "${libdir}"
inherit native
-SRC_URI_append = " http://golang.org/dl/go1.4.3.src.tar.gz;name=bootstrap;subdir=go1.4"
-SRC_URI[bootstrap.md5sum] = "dfb604511115dd402a77a553a5923a04"
-SRC_URI[bootstrap.sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959"
+SRC_URI_append = " https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz;name=bootstrap;subdir=go1.4"
+SRC_URI[bootstrap.md5sum] = "dbf727a4b0e365bf88d97cbfde590016"
+SRC_URI[bootstrap.sha256sum] = "f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52"
export GOOS = "${BUILD_GOOS}"
export GOARCH = "${BUILD_GOARCH}"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
CC = "${@d.getVar('BUILD_CC').strip()}"
export CGO_ENABLED = "1"
+GOMAKEARGS ?= "--no-banner"
do_configure() {
- cd ${WORKDIR}/go1.4/go/src
- CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
+ cd ${WORKDIR}/go1.4/go/src
+ CGO_ENABLED=0 GOROOT=${WORKDIR}/go1.4/go ./make.bash
}
do_compile() {
- export GOBIN="${B}/bin"
export GOROOT_FINAL="${nonstaging_libdir}/go"
export GOROOT_BOOTSTRAP="${WORKDIR}/go1.4/go"
- rm -rf ${GOBIN}
- mkdir ${GOBIN}
-
- export TMPDIR=${WORKDIR}/build-tmp
- mkdir -p ${WORKDIR}/build-tmp
cd src
- ./make.bash --host-only
+ ./make.bash ${GOMAKEARGS}
+ cd ${B}
}
+do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin"
+do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin"
make_wrapper() {
rm -f ${D}${bindir}/$2$3
@@ -51,7 +51,7 @@ do_install() {
(cd ${S}/src; for d in *; do \
[ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \
done)
- rm -rf ${D}${libdir}/go/src/runtime/pprof/testdata
+ find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
install -d ${D}${bindir} ${D}${libdir}/go/bin
for f in ${B}/bin/*
do