1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 10:31:51 +00:00

Fix Golang update by adding 1.20.6 as boostrap

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-02-10 14:09:04 +01:00
parent 55186758bc
commit 28fd18c5f7
3 changed files with 30 additions and 3 deletions

View file

@ -215,7 +215,7 @@ GO_PKG_BUILD_VARS= \
GOPATH="$(GO_PKG_BUILD_DIR)" \ GOPATH="$(GO_PKG_BUILD_DIR)" \
GOCACHE="$(GO_BUILD_CACHE_DIR)" \ GOCACHE="$(GO_BUILD_CACHE_DIR)" \
GOMODCACHE="$(GO_MOD_CACHE_DIR)" \ GOMODCACHE="$(GO_MOD_CACHE_DIR)" \
GOENV=off GOPROXY="direct" \ GOENV=off \
GOTOOLCHAIN=local GOTOOLCHAIN=local
GO_PKG_VARS= \ GO_PKG_VARS= \

View file

@ -31,7 +31,6 @@ unexport \
GOROOT \ GOROOT \
GOTOOLCHAIN \ GOTOOLCHAIN \
GOTMPDIR \ GOTMPDIR \
GOPROXY \
GOWORK GOWORK
# Unmodified: # Unmodified:
# GOINSECURE # GOINSECURE

View file

@ -95,6 +95,12 @@ BOOTSTRAP_1_17_HASH:=a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd
BOOTSTRAP_1_17_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.17 BOOTSTRAP_1_17_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.17
BOOTSTRAP_1_20_SOURCE:=go1.20.6.src.tar.gz
BOOTSTRAP_1_20_SOURCE_URL:=$(GO_SOURCE_URLS)
BOOTSTRAP_1_20_HASH:=62ee5bc6fb55b8bae8f705e0cb8df86d6453626b4ecf93279e2867092e0b7f70
BOOTSTRAP_1_20_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.20
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include ../golang-compiler.mk include ../golang-compiler.mk
@ -104,6 +110,7 @@ PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DI
HOST_UNPACK:=$(HOST_TAR) -C "$(HOST_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)" HOST_UNPACK:=$(HOST_TAR) -C "$(HOST_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
BOOTSTRAP_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_SOURCE)" BOOTSTRAP_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_SOURCE)"
BOOTSTRAP_1_17_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_17_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_17_SOURCE)" BOOTSTRAP_1_17_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_17_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_17_SOURCE)"
BOOTSTRAP_1_20_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_20_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_20_SOURCE)"
# don't strip ELF executables in test data # don't strip ELF executables in test data
RSTRIP:=: RSTRIP:=:
@ -215,6 +222,22 @@ Hooks/HostPrepare/Post+=Bootstrap-1.17/Prepare
$(eval $(call GoCompiler/AddProfile,Bootstrap-1.17,$(BOOTSTRAP_1_17_BUILD_DIR),,bootstrap-1.17,$(GO_HOST_OS_ARCH))) $(eval $(call GoCompiler/AddProfile,Bootstrap-1.17,$(BOOTSTRAP_1_17_BUILD_DIR),,bootstrap-1.17,$(GO_HOST_OS_ARCH)))
# Bootstrap 1.20
define Download/golang-bootstrap-1.20
FILE:=$(BOOTSTRAP_1_20_SOURCE)
URL:=$(BOOTSTRAP_1_20_SOURCE_URL)
HASH:=$(BOOTSTRAP_1_20_HASH)
endef
$(eval $(call Download,golang-bootstrap-1.20))
define Bootstrap-1.20/Prepare
mkdir -p "$(BOOTSTRAP_1_20_BUILD_DIR)" && $(BOOTSTRAP_1_20_UNPACK) ;
endef
Hooks/HostPrepare/Post+=Bootstrap-1.20/Prepare
$(eval $(call GoCompiler/AddProfile,Bootstrap-1.20,$(BOOTSTRAP_1_20_BUILD_DIR),,bootstrap-1.20,$(GO_HOST_OS_ARCH)))
# Host # Host
@ -251,8 +274,13 @@ define Host/Compile
$(HOST_GO_VARS) \ $(HOST_GO_VARS) \
) )
$(call GoCompiler/Host/Make, \ $(call GoCompiler/Bootstrap-1.20/Make, \
GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_17_BUILD_DIR)" \ GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_17_BUILD_DIR)" \
$(HOST_GO_VARS) \
)
$(call GoCompiler/Host/Make, \
GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_20_BUILD_DIR)" \
$(if $(HOST_GO_ENABLE_PIE),GO_LDFLAGS="-buildmode pie") \ $(if $(HOST_GO_ENABLE_PIE),GO_LDFLAGS="-buildmode pie") \
$(HOST_GO_VARS) \ $(HOST_GO_VARS) \
) )