summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/go.bbclass1
-rw-r--r--meta/recipes-devtools/go/go-cross.inc1
-rw-r--r--meta/recipes-devtools/go/go-runtime.inc1
-rw-r--r--meta/recipes-devtools/go/go-target.inc1
4 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index b6d9372c56..e05a5c641c 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -7,6 +7,7 @@ GOROOT_class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go"
GOROOT = "${STAGING_LIBDIR}/go"
export GOROOT
export GOROOT_FINAL = "${libdir}/go"
+export GOCACHE = "${B}/.cache"
export GOARCH = "${TARGET_GOARCH}"
export GOOS = "${TARGET_GOOS}"
diff --git a/meta/recipes-devtools/go/go-cross.inc b/meta/recipes-devtools/go/go-cross.inc
index 29ce7f6e84..3d344a74d3 100644
--- a/meta/recipes-devtools/go/go-cross.inc
+++ b/meta/recipes-devtools/go/go-cross.inc
@@ -14,6 +14,7 @@ export GO386 = "${TARGET_GO386}"
export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
+export GOCACHE = "${B}/.cache"
CC = "${@d.getVar('BUILD_CC').strip()}"
do_configure[noexec] = "1"
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index c219aa3789..e282195619 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -15,6 +15,7 @@ export CGO_CFLAGS = "${CFLAGS}"
export CGO_CPPFLAGS = "${CPPFLAGS}"
export CGO_CXXFLAGS = "${CXXFLAGS}"
export CGO_LDFLAGS = "${LDFLAGS}"
+export GOCACHE = "${B}/.cache"
GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc
index 379f87b498..91efd3e977 100644
--- a/meta/recipes-devtools/go/go-target.inc
+++ b/meta/recipes-devtools/go/go-target.inc
@@ -10,6 +10,7 @@ export GO386 = "${TARGET_GO386}"
export GOMIPS = "${TARGET_GOMIPS}"
export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go"
export GOROOT_FINAL = "${libdir}/go"
+export GOCACHE = "${B}/.cache"
GO_LDFLAGS = ""
GO_LDFLAGS_class-nativesdk = "-linkmode external"
export GO_LDFLAGS