All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/next] package/go: re-integrate GO_COMMON_ENV into HOST_GO_COMMON_ENV
@ 2020-08-29 12:35 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2020-08-29 12:35 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=1a17e4ae996c4c6727a29f049892be5ae57d7e89
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

There is no point in having some common Go env variables defined in
pkg-golang.mk:GO_COMMON_ENV, and some in
package/go/go.mk:HOST_GO_COMMON_ENV. Let's move all of them to
package/go/go.mk:HOST_GO_COMMON_ENV.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/go/go.mk      |  7 ++++++-
 package/pkg-golang.mk | 13 ++-----------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/package/go/go.mk b/package/go/go.mk
index af1548a65e..8dfd96c88a 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -16,9 +16,14 @@ 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
 
+# We pass an empty GOBIN, otherwise "go install: cannot install
+# cross-compiled binaries when GOBIN is set"
 HOST_GO_COMMON_ENV = \
 	GO111MODULE=off \
-	GOROOT="$(HOST_GO_ROOT)"
+	GOROOT="$(HOST_GO_ROOT)" \
+	PATH=$(BR_PATH) \
+	GOBIN= \
+	CGO_ENABLED=$(HOST_GO_CGO_ENABLED)
 
 ifeq ($(BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS),y)
 
diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index 79c27b855f..9904ddcc1a 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -23,20 +23,11 @@
 
 GO_BIN = $(HOST_DIR)/bin/go
 
-# We pass an empty GOBIN, otherwise "go install: cannot install
-# cross-compiled binaries when GOBIN is set"
-GO_COMMON_ENV = \
-	PATH=$(BR_PATH) \
-	GOBIN= \
-	CGO_ENABLED=$(HOST_GO_CGO_ENABLED)
-
 GO_TARGET_ENV = \
-	$(HOST_GO_TARGET_ENV) \
-	$(GO_COMMON_ENV)
+	$(HOST_GO_TARGET_ENV)
 
 GO_HOST_ENV = \
-	$(HOST_GO_HOST_ENV) \
-	$(GO_COMMON_ENV)
+	$(HOST_GO_HOST_ENV)
 
 ################################################################################
 # inner-golang-package -- defines how the configuration, compilation and

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-29 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 12:35 [Buildroot] [git commit branch/next] package/go: re-integrate GO_COMMON_ENV into HOST_GO_COMMON_ENV Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.