mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
26227695b3
commit
7a4ca89b55
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user