summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/go-cross
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2016-05-13 15:07:46 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-06-14 10:59:20 -0400
commit25ee1f1d1e4a5a608d0303bb79f8c45c726f631c (patch)
treec01ee5dbef0934495a4856e12aedea9bd7c4b2bf /recipes-devtools/go-cross
parenta9a9fc03db86d659ba7da3eccd72540159de6c72 (diff)
downloadmeta-virtualization-25ee1f1d1e4a5a608d0303bb79f8c45c726f631c.tar.gz
go-cross: don't use host /var/tmp for temporary build artifacts
The default behavior for go-cross build is to use the path specified in TMPDIR for some temporary build artifacts and if no TMPDIR is set in the environment to fallback to use /var/tmp. This causes a build failure on hosts that do not have a /var/tmp or that have restrictive permissions on /var/tmp. The failure is seen as: go tool dist: mkdtemp(/var/tmp/go-cbuild-yhmNbi): No such file or directory By setting TMPDIR and ensuring we create this directory we can avoid the associated issue with using the default. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-devtools/go-cross')
-rw-r--r--recipes-devtools/go-cross/go-cross.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/recipes-devtools/go-cross/go-cross.inc b/recipes-devtools/go-cross/go-cross.inc
index eea1b2ce..cd75b401 100644
--- a/recipes-devtools/go-cross/go-cross.inc
+++ b/recipes-devtools/go-cross/go-cross.inc
@@ -17,9 +17,13 @@ CC = "${@d.getVar('BUILD_CC', True).strip()}"
17do_configure[noexec] = "1" 17do_configure[noexec] = "1"
18 18
19do_compile() { 19do_compile() {
20 export GOBIN="${B}/bin" 20 export GOBIN="${B}/bin"
21 rm -rf ${GOBIN} ${B}/pkg 21 rm -rf ${GOBIN} ${B}/pkg
22 mkdir ${GOBIN} 22 mkdir ${GOBIN}
23
24 export TMPDIR=${WORKDIR}/build-tmp
25 mkdir ${WORKDIR}/build-tmp
26
23 cd src 27 cd src
24 ./make.bash --host-only 28 ./make.bash --host-only
25} 29}