aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
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/classes
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/classes')
-rw-r--r--meta/classes/go.bbclass6
1 files changed, 6 insertions, 0 deletions
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
}