From 7a4ca89b557648d9aae30b405f6be09b4a383abe Mon Sep 17 00:00:00 2001 From: Matt Madison Date: Sun, 4 Mar 2018 13:09:25 -0800 Subject: 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 (From OE-Core rev: 4fd749ca6450a4870be1c1e13802f084b6eb0db6) Signed-off-by: Matt Madison Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes/go.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meta/classes') diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 7ecd8c9254..a01b28bccd 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -24,6 +24,7 @@ GO_LINKMODE ?= "" GO_LINKMODE_class-nativesdk = "--linkmode=external" GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}" +export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" export GOPTESTFLAGS ?= "-test.v" GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " @@ -47,6 +48,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" B = "${WORKDIR}/build" export GOPATH = "${B}" +export GOCACHE = "off" GO_TMPDIR ?= "${WORKDIR}/go-tmp" GO_TMPDIR[vardepvalue] = "" @@ -88,6 +90,10 @@ go_do_compile() { export TMPDIR="${GO_TMPDIR}" ${GO} env if [ -n "${GO_INSTALL}" ]; then + if [ -n "${GO_LINKSHARED}" ]; then + ${GO} install ${GOBUILDFLAGS} `go_list_packages` + rm -rf ${B}/bin + fi ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` fi } -- cgit v1.2.3-54-g00ecf