mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
package/go: introduce HOST_GO_COMMON_ENV
A few variables are common between HOST_GO_TARGET_ENV and HOST_GO_HOST_ENV, so let's introduce a HOST_GO_COMMON_ENV variable for those few common ones (which will increase in follow-up commits). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
@@ -16,6 +16,10 @@ HOST_GO_HOST_CACHE = $(HOST_DIR)/usr/share/host-go-cache
|
|||||||
HOST_GO_ROOT = $(HOST_DIR)/lib/go
|
HOST_GO_ROOT = $(HOST_DIR)/lib/go
|
||||||
HOST_GO_TARGET_CACHE = $(HOST_DIR)/usr/share/go-cache
|
HOST_GO_TARGET_CACHE = $(HOST_DIR)/usr/share/go-cache
|
||||||
|
|
||||||
|
HOST_GO_COMMON_ENV = \
|
||||||
|
GO111MODULE=off \
|
||||||
|
GOROOT="$(HOST_GO_ROOT)"
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS),y)
|
ifeq ($(BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS),y)
|
||||||
|
|
||||||
ifeq ($(BR2_arm),y)
|
ifeq ($(BR2_arm),y)
|
||||||
@@ -46,10 +50,9 @@ endif
|
|||||||
# For the convienience of target packages.
|
# For the convienience of target packages.
|
||||||
HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH)
|
HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH)
|
||||||
HOST_GO_TARGET_ENV = \
|
HOST_GO_TARGET_ENV = \
|
||||||
GO111MODULE=off \
|
$(HOST_GO_COMMON_ENV) \
|
||||||
GOARCH=$(GO_GOARCH) \
|
GOARCH=$(GO_GOARCH) \
|
||||||
GOCACHE="$(HOST_GO_TARGET_CACHE)" \
|
GOCACHE="$(HOST_GO_TARGET_CACHE)" \
|
||||||
GOROOT="$(HOST_GO_ROOT)" \
|
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
CXX="$(TARGET_CXX)" \
|
CXX="$(TARGET_CXX)" \
|
||||||
GOTOOLDIR="$(HOST_GO_TOOLDIR)"
|
GOTOOLDIR="$(HOST_GO_TOOLDIR)"
|
||||||
@@ -79,10 +82,9 @@ endif # BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
|
|||||||
|
|
||||||
# For the convenience of host golang packages
|
# For the convenience of host golang packages
|
||||||
HOST_GO_HOST_ENV = \
|
HOST_GO_HOST_ENV = \
|
||||||
GO111MODULE=off \
|
$(HOST_GO_COMMON_ENV) \
|
||||||
GOARCH="" \
|
GOARCH="" \
|
||||||
GOCACHE="$(HOST_GO_HOST_CACHE)" \
|
GOCACHE="$(HOST_GO_HOST_CACHE)" \
|
||||||
GOROOT="$(HOST_GO_ROOT)" \
|
|
||||||
CC="$(HOST_CCNOCCACHE)" \
|
CC="$(HOST_CCNOCCACHE)" \
|
||||||
CXX="$(HOST_CXXNOCCACHE)" \
|
CXX="$(HOST_CXXNOCCACHE)" \
|
||||||
CGO_CFLAGS="$(HOST_CFLAGS)" \
|
CGO_CFLAGS="$(HOST_CFLAGS)" \
|
||||||
|
|||||||
Reference in New Issue
Block a user