package/go: re-integrate GO_COMMON_ENV into HOST_GO_COMMON_ENV
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 29 Aug 2020 09:14:35 +0000 (11:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 29 Aug 2020 12:35:49 +0000 (14:35 +0200)
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
package/pkg-golang.mk

index af1548a65e7581f880540ab3eb0eac14f25f2eac..8dfd96c88a1c7c64dd7f26ace148be904affde2f 100644 (file)
@@ -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)
 
index 79c27b855f4260657d3587a9d622f773d93679b4..9904ddcc1ab6d9f52b2580d446a1e70ae05bc152 100644 (file)
 
 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