Merge pull request #18584 from mpratt14/golang-bootstrap-arch
golang: some makefile fixes
This commit is contained in:
commit
d71f082cdc
2 changed files with 12 additions and 3 deletions
|
@ -27,7 +27,10 @@ define GoCompiler/Default/Make
|
|||
cd "$(1)/src" ; \
|
||||
$(if $(2),GOROOT_FINAL="$(2)/lib/go-$(3)") \
|
||||
$(4) \
|
||||
$(BASH) make.bash --no-banner ; \
|
||||
$(BASH) make.bash \
|
||||
$(if $(findstring s,$(OPENWRT_VERBOSE)),-v) \
|
||||
--no-banner \
|
||||
; \
|
||||
)
|
||||
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)))
|
||||
|
||||
HOST_GO_VARS= \
|
||||
GOHOSTARCH="$(GO_HOST_ARCH)" \
|
||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
||||
GOENV=off \
|
||||
CC="$(HOSTCC_NOCACHE)" \
|
||||
CXX="$(HOSTCXX_NOCACHE)"
|
||||
|
||||
define Host/Compile
|
||||
define Host/Configure
|
||||
$(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH))
|
||||
$(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH))
|
||||
|
||||
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(call GoCompiler/Bootstrap/Make, \
|
||||
$(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_VARS= \
|
||||
GOHOSTARCH="$(GO_HOST_ARCH)" \
|
||||
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
|
||||
GOENV=off \
|
||||
GO_GCC_HELPER_PATH="$$$$PATH" \
|
||||
|
@ -300,9 +304,11 @@ PKG_GO_INSTALL_ARGS= \
|
|||
$(if $(PKG_GO_ASMFLAGS),-asmflags "all=$(PKG_GO_ASMFLAGS)") \
|
||||
$(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie)
|
||||
|
||||
define Build/Compile
|
||||
define Build/Configure
|
||||
mkdir -p "$(GO_BUILD_CACHE_DIR)"
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
@echo "Building target Go first stage"
|
||||
|
||||
$(call GoCompiler/Package/Make, \
|
||||
|
|
Loading…
Reference in a new issue