Merge pull request #18584 from mpratt14/golang-bootstrap-arch
golang: some makefile fixes
This commit is contained in:
commit
d71f082cdc
|
@ -27,7 +27,10 @@ define GoCompiler/Default/Make
|
||||||
cd "$(1)/src" ; \
|
cd "$(1)/src" ; \
|
||||||
$(if $(2),GOROOT_FINAL="$(2)/lib/go-$(3)") \
|
$(if $(2),GOROOT_FINAL="$(2)/lib/go-$(3)") \
|
||||||
$(4) \
|
$(4) \
|
||||||
$(BASH) make.bash --no-banner ; \
|
$(BASH) make.bash \
|
||||||
|
$(if $(findstring s,$(OPENWRT_VERBOSE)),-v) \
|
||||||
|
--no-banner \
|
||||||
|
; \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -202,17 +202,20 @@ endif
|
||||||
$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH),$(HOST_GO_INSTALL_SUFFIX)))
|
$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH),$(HOST_GO_INSTALL_SUFFIX)))
|
||||||
|
|
||||||
HOST_GO_VARS= \
|
HOST_GO_VARS= \
|
||||||
|
GOHOSTARCH="$(GO_HOST_ARCH)" \
|
||||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
||||||
GOENV=off \
|
GOENV=off \
|
||||||
CC="$(HOSTCC_NOCACHE)" \
|
CC="$(HOSTCC_NOCACHE)" \
|
||||||
CXX="$(HOSTCXX_NOCACHE)"
|
CXX="$(HOSTCXX_NOCACHE)"
|
||||||
|
|
||||||
define Host/Compile
|
define Host/Configure
|
||||||
$(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH))
|
$(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH))
|
||||||
$(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH))
|
$(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH))
|
||||||
|
|
||||||
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Host/Compile
|
||||||
$(call GoCompiler/Bootstrap/Make, \
|
$(call GoCompiler/Bootstrap/Make, \
|
||||||
$(HOST_GO_VARS) \
|
$(HOST_GO_VARS) \
|
||||||
)
|
)
|
||||||
|
@ -271,6 +274,7 @@ PKG_GO_ZBOOTSTRAP_MODS:= \
|
||||||
PKG_GO_ZBOOTSTRAP_PATH:=$(PKG_BUILD_DIR)/src/internal/buildcfg/zbootstrap.go
|
PKG_GO_ZBOOTSTRAP_PATH:=$(PKG_BUILD_DIR)/src/internal/buildcfg/zbootstrap.go
|
||||||
|
|
||||||
PKG_GO_VARS= \
|
PKG_GO_VARS= \
|
||||||
|
GOHOSTARCH="$(GO_HOST_ARCH)" \
|
||||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
||||||
GOENV=off \
|
GOENV=off \
|
||||||
GO_GCC_HELPER_PATH="$$$$PATH" \
|
GO_GCC_HELPER_PATH="$$$$PATH" \
|
||||||
|
@ -300,9 +304,11 @@ PKG_GO_INSTALL_ARGS= \
|
||||||
$(if $(PKG_GO_ASMFLAGS),-asmflags "all=$(PKG_GO_ASMFLAGS)") \
|
$(if $(PKG_GO_ASMFLAGS),-asmflags "all=$(PKG_GO_ASMFLAGS)") \
|
||||||
$(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie)
|
$(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie)
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Configure
|
||||||
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
@echo "Building target Go first stage"
|
@echo "Building target Go first stage"
|
||||||
|
|
||||||
$(call GoCompiler/Package/Make, \
|
$(call GoCompiler/Package/Make, \
|
||||||
|
|
Loading…
Reference in New Issue