diff options
author | Matt Madison <matt@madison.systems> | 2018-03-04 13:09:25 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-06 06:43:10 -0800 |
commit | 7a4ca89b557648d9aae30b405f6be09b4a383abe (patch) | |
tree | fb131b91c54b054ad525566d2da014abaa7c8f9f /meta/classes/go.bbclass | |
parent | 26227695b350056225e9d309defdcd66573b79bb (diff) | |
download | poky-7a4ca89b557648d9aae30b405f6be09b4a383abe.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
(From OE-Core rev: 4fd749ca6450a4870be1c1e13802f084b6eb0db6)
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/go.bbclass')
-rw-r--r-- | meta/classes/go.bbclass | 6 |
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 ?= "" | |||
24 | GO_LINKMODE_class-nativesdk = "--linkmode=external" | 24 | GO_LINKMODE_class-nativesdk = "--linkmode=external" |
25 | GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' | 25 | GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' |
26 | export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}" | 26 | export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}" |
27 | export GOPATH_OMIT_IN_ACTIONID ?= "1" | ||
27 | export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" | 28 | export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" |
28 | export GOPTESTFLAGS ?= "-test.v" | 29 | export GOPTESTFLAGS ?= "-test.v" |
29 | GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " | 30 | GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " |
@@ -47,6 +48,7 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" | |||
47 | 48 | ||
48 | B = "${WORKDIR}/build" | 49 | B = "${WORKDIR}/build" |
49 | export GOPATH = "${B}" | 50 | export GOPATH = "${B}" |
51 | export GOCACHE = "off" | ||
50 | GO_TMPDIR ?= "${WORKDIR}/go-tmp" | 52 | GO_TMPDIR ?= "${WORKDIR}/go-tmp" |
51 | GO_TMPDIR[vardepvalue] = "" | 53 | GO_TMPDIR[vardepvalue] = "" |
52 | 54 | ||
@@ -88,6 +90,10 @@ go_do_compile() { | |||
88 | export TMPDIR="${GO_TMPDIR}" | 90 | export TMPDIR="${GO_TMPDIR}" |
89 | ${GO} env | 91 | ${GO} env |
90 | if [ -n "${GO_INSTALL}" ]; then | 92 | if [ -n "${GO_INSTALL}" ]; then |
93 | if [ -n "${GO_LINKSHARED}" ]; then | ||
94 | ${GO} install ${GOBUILDFLAGS} `go_list_packages` | ||
95 | rm -rf ${B}/bin | ||
96 | fi | ||
91 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` | 97 | ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` |
92 | fi | 98 | fi |
93 | } | 99 | } |