|
@@ -52,7 +52,7 @@ HOST_GO_TARGET_ENV = \
|
|
# set, build in cgo support for any go programs that may need it. Note that
|
|
# set, build in cgo support for any go programs that may need it. Note that
|
|
# any target package needing cgo support must include
|
|
# any target package needing cgo support must include
|
|
# 'depends on BR2_TOOLCHAIN_HAS_THREADS' in its config file.
|
|
# 'depends on BR2_TOOLCHAIN_HAS_THREADS' in its config file.
|
|
-ifeq (BR2_TOOLCHAIN_HAS_THREADS,y)
|
|
|
|
|
|
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
|
HOST_GO_CGO_ENABLED = 1
|
|
HOST_GO_CGO_ENABLED = 1
|
|
else
|
|
else
|
|
HOST_GO_CGO_ENABLED = 0
|
|
HOST_GO_CGO_ENABLED = 0
|
|
@@ -74,8 +74,8 @@ HOST_GO_MAKE_ENV = \
|
|
GOARCH=$(GO_GOARCH) \
|
|
GOARCH=$(GO_GOARCH) \
|
|
$(if $(GO_GOARM),GOARM=$(GO_GOARM)) \
|
|
$(if $(GO_GOARM),GOARM=$(GO_GOARM)) \
|
|
GOOS=linux \
|
|
GOOS=linux \
|
|
- CGO_ENABLED=$(HOST_GO_CGO_ENABLED) \
|
|
|
|
- CC=$(HOSTCC_NOCCACHE)
|
|
|
|
|
|
+ CC=$(HOSTCC_NOCCACHE) \
|
|
|
|
+ CXX=$(HOSTCXX_NOCCACHE)
|
|
|
|
|
|
HOST_GO_TARGET_CC = \
|
|
HOST_GO_TARGET_CC = \
|
|
CC_FOR_TARGET="$(TARGET_CC)" \
|
|
CC_FOR_TARGET="$(TARGET_CC)" \
|
|
@@ -83,16 +83,18 @@ HOST_GO_TARGET_CC = \
|
|
|
|
|
|
HOST_GO_HOST_CC = \
|
|
HOST_GO_HOST_CC = \
|
|
CC_FOR_TARGET=$(HOSTCC_NOCCACHE) \
|
|
CC_FOR_TARGET=$(HOSTCC_NOCCACHE) \
|
|
- CXX_FOR_TARGET=$(HOSTCC_NOCCACHE)
|
|
|
|
|
|
+ CXX_FOR_TARGET=$(HOSTCXX_NOCCACHE)
|
|
|
|
|
|
HOST_GO_TMP = $(@D)/host-go-tmp
|
|
HOST_GO_TMP = $(@D)/host-go-tmp
|
|
|
|
|
|
define HOST_GO_BUILD_CMDS
|
|
define HOST_GO_BUILD_CMDS
|
|
- cd $(@D)/src && $(HOST_GO_MAKE_ENV) $(HOST_GO_HOST_CC) ./make.bash
|
|
|
|
|
|
+ cd $(@D)/src && \
|
|
|
|
+ $(HOST_GO_MAKE_ENV) $(HOST_GO_HOST_CC) CGO_ENABLED=0 ./make.bash
|
|
mkdir -p $(HOST_GO_TMP)
|
|
mkdir -p $(HOST_GO_TMP)
|
|
mv $(@D)/pkg/tool $(HOST_GO_TMP)/
|
|
mv $(@D)/pkg/tool $(HOST_GO_TMP)/
|
|
mv $(@D)/bin/ $(HOST_GO_TMP)/
|
|
mv $(@D)/bin/ $(HOST_GO_TMP)/
|
|
- cd $(@D)/src && $(HOST_GO_MAKE_ENV) $(HOST_GO_TARGET_CC) ./make.bash
|
|
|
|
|
|
+ cd $(@D)/src && \
|
|
|
|
+ $(HOST_GO_MAKE_ENV) $(HOST_GO_TARGET_CC) CGO_ENABLED=$(HOST_GO_CGO_ENABLED) ./make.bash
|
|
endef
|
|
endef
|
|
|
|
|
|
define HOST_GO_INSTALL_CMDS
|
|
define HOST_GO_INSTALL_CMDS
|