Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/go: set GOCACHE to a host path
@ 2019-03-12  5:41 Christian Stewart
  2019-03-12 21:06 ` Thomas Petazzoni
  2019-03-25 19:05 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Stewart @ 2019-03-12  5:41 UTC (permalink / raw)
  To: buildroot

Set the GOCACHE environment variable properly.

It was previously unset, and defaults to $HOME/.cache/go-build.

Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/go/go.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/go/go.mk b/package/go/go.mk
index 1558b55e21..4daa2fe093 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -37,13 +37,16 @@ GO_GOARCH = mips64le
 endif
 
 HOST_GO_DEPENDENCIES = host-go-bootstrap
+HOST_GO_HOST_CACHE = $(HOST_DIR)/usr/share/host-go-cache
 HOST_GO_ROOT = $(HOST_DIR)/lib/go
+HOST_GO_TARGET_CACHE = $(HOST_DIR)/usr/share/go-cache
 
 # For the convienience of target packages.
 HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH)
 HOST_GO_TARGET_ENV = \
 	GO111MODULE=off \
 	GOARCH=$(GO_GOARCH) \
+	GOCACHE="$(HOST_GO_TARGET_CACHE)" \
 	GOROOT="$(HOST_GO_ROOT)" \
 	CC="$(TARGET_CC)" \
 	CXX="$(TARGET_CXX)" \
@@ -63,6 +66,7 @@ endif
 # HOSTCC_NOCCACHE.  See https://github.com/golang/go/issues/11685.
 HOST_GO_MAKE_ENV = \
 	GO111MODULE=off \
+	GOCACHE=$(HOST_GO_HOST_CACHE) \
 	GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_ROOT) \
 	GOROOT_FINAL=$(HOST_GO_ROOT) \
 	GOROOT="$(@D)" \
-- 
2.19.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/go: set GOCACHE to a host path
  2019-03-12  5:41 [Buildroot] [PATCH 1/1] package/go: set GOCACHE to a host path Christian Stewart
@ 2019-03-12 21:06 ` Thomas Petazzoni
  2019-03-25 19:05 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-03-12 21:06 UTC (permalink / raw)
  To: buildroot

On Mon, 11 Mar 2019 22:41:14 -0700
Christian Stewart <christian@paral.in> wrote:

> Set the GOCACHE environment variable properly.
> 
> It was previously unset, and defaults to $HOME/.cache/go-build.
> 
> Signed-off-by: Christian Stewart <christian@paral.in>
> ---
>  package/go/go.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/go: set GOCACHE to a host path
  2019-03-12  5:41 [Buildroot] [PATCH 1/1] package/go: set GOCACHE to a host path Christian Stewart
  2019-03-12 21:06 ` Thomas Petazzoni
@ 2019-03-25 19:05 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2019-03-25 19:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Christian" == Christian Stewart <christian@paral.in> writes:

 > Set the GOCACHE environment variable properly.
 > It was previously unset, and defaults to $HOME/.cache/go-build.

 > Signed-off-by: Christian Stewart <christian@paral.in>

Committed to 2018.11.x and 2019.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-25 19:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-12  5:41 [Buildroot] [PATCH 1/1] package/go: set GOCACHE to a host path Christian Stewart
2019-03-12 21:06 ` Thomas Petazzoni
2019-03-25 19:05 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox