diff options
author | Matt Madison <matt@madison.systems> | 2018-03-04 13:09:27 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-06 06:36:32 -0800 |
commit | ce9d70ae2f9981bf5b42641922c34c1ed54eeca3 (patch) | |
tree | 239178059833c4ac81f43b0eec8fdecdebd625b9 | |
parent | f3cabc92dca3408da18f04e4af4051fba1f63c14 (diff) | |
download | openembedded-core-ce9d70ae2f9981bf5b42641922c34c1ed54eeca3.tar.gz openembedded-core-ce9d70ae2f9981bf5b42641922c34c1ed54eeca3.tar.bz2 openembedded-core-ce9d70ae2f9981bf5b42641922c34c1ed54eeca3.zip |
go.bbclass: rename GO_TMPDIR -> GOTMPDIR
and export it. Go 1.10 now supports using this
separate variable locating its temporary files.
TMPDIR is still set, for compatibility with go1.9;
that can be dropped once 1.9 is retired.
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/classes/go.bbclass | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index a01b28bccd..96302a187c 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -49,8 +49,8 @@ GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" B = "${WORKDIR}/build" export GOPATH = "${B}" export GOCACHE = "off" -GO_TMPDIR ?= "${WORKDIR}/go-tmp" -GO_TMPDIR[vardepvalue] = "" +export GOTMPDIR ?= "${WORKDIR}/go-tmp" +GOTMPDIR[vardepvalue] = "" python go_do_unpack() { src_uri = (d.getVar('SRC_URI') or "").split() @@ -85,9 +85,10 @@ go_list_package_tests() { go_do_configure() { ln -snf ${S}/src ${B}/ } +do_configure[dirs] =+ "${GOTMPDIR}" go_do_compile() { - export TMPDIR="${GO_TMPDIR}" + export TMPDIR="${GOTMPDIR}" ${GO} env if [ -n "${GO_INSTALL}" ]; then if [ -n "${GO_LINKSHARED}" ]; then @@ -97,11 +98,11 @@ go_do_compile() { ${GO} install ${GO_LINKSHARED} ${GOBUILDFLAGS} `go_list_packages` fi } -do_compile[dirs] =+ "${GO_TMPDIR}" +do_compile[dirs] =+ "${GOTMPDIR}" do_compile[cleandirs] = "${B}/bin ${B}/pkg" do_compile_ptest() { - export TMPDIR="${GO_TMPDIR}" + export TMPDIR="${GOTMPDIR}" rm -f ${B}/.go_compiled_tests.list go_list_package_tests | while read pkg; do cd ${B}/src/$pkg @@ -110,7 +111,7 @@ do_compile_ptest() { sed -e's,/\./,/,'>> ${B}/.go_compiled_tests.list done } -do_compile_ptest_base[dirs] =+ "${GO_TMPDIR}" +do_compile_ptest_base[dirs] =+ "${GOTMPDIR}" go_do_install() { install -d ${D}${libdir}/go/src/${GO_IMPORT} |