golang: Update to 1.24.0
authorTianling Shen <[email protected]>
Tue, 18 Feb 2025 12:19:12 +0000 (20:19 +0800)
committerTianling Shen <[email protected]>
Thu, 6 Mar 2025 17:22:45 +0000 (01:22 +0800)
Add libstdcpp and libtiff as dependencies, which are required by
debug/elf package.

Release note: https://go.dev/doc/go1.24

Signed-off-by: Tianling Shen <[email protected]>
lang/golang/golang/Makefile

index b00ea8509b1b56d58f6ad82265cfbb0f1a922738..4511ee171e19dafc6e9ddec5cc90a1359471bc66 100644 (file)
@@ -7,8 +7,8 @@
 
 include $(TOPDIR)/rules.mk
 
-GO_VERSION_MAJOR_MINOR:=1.23
-GO_VERSION_PATCH:=6
+GO_VERSION_MAJOR_MINOR:=1.24
+GO_VERSION_PATCH:=0
 
 PKG_NAME:=golang
 PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
@@ -20,7 +20,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \
 
 PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
 PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
-PKG_HASH:=039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222
+PKG_HASH:=d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5
 
 PKG_MAINTAINER:=Jeffery To <[email protected]>
 PKG_LICENSE:=BSD-3-Clause
@@ -101,6 +101,12 @@ BOOTSTRAP_1_20_HASH:=1aef321a0e3e38b7e91d2d7eb64040666cabdcc77d383de3c9522d0d69b
 
 BOOTSTRAP_1_20_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.20
 
+BOOTSTRAP_1_22_SOURCE:=go1.22.6.src.tar.gz
+BOOTSTRAP_1_22_SOURCE_URL:=$(GO_SOURCE_URLS)
+BOOTSTRAP_1_22_HASH:=9e48d99d519882579917d8189c17e98c373ce25abaebb98772e2927088992a51
+
+BOOTSTRAP_1_22_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap_1.22
+
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 include ../golang-compiler.mk
@@ -111,6 +117,7 @@ HOST_UNPACK:=$(HOST_TAR) -C "$(HOST_BUILD_DIR)" --strip-components=1 -xzf "$(DL_
 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_20_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_20_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_20_SOURCE)"
+BOOTSTRAP_1_22_UNPACK:=$(HOST_TAR) -C "$(BOOTSTRAP_1_22_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(BOOTSTRAP_1_22_SOURCE)"
 
 # don't strip ELF executables in test data
 RSTRIP:=:
@@ -173,6 +180,7 @@ endef
 define Package/golang-src
 $(call Package/golang/Default)
   TITLE+= (source files)
+  DEPENDS+= +libstdcpp +libtiff
 endef
 
 define Package/golang-src/description
@@ -239,6 +247,23 @@ 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)))
 
+
+# Bootstrap 1.22
+
+define Download/golang-bootstrap-1.22
+  FILE:=$(BOOTSTRAP_1_22_SOURCE)
+  URL:=$(BOOTSTRAP_1_22_SOURCE_URL)
+  HASH:=$(BOOTSTRAP_1_22_HASH)
+endef
+$(eval $(call Download,golang-bootstrap-1.22))
+
+define Bootstrap-1.22/Prepare
+       mkdir -p "$(BOOTSTRAP_1_22_BUILD_DIR)" && $(BOOTSTRAP_1_22_UNPACK) ;
+endef
+Hooks/HostPrepare/Post+=Bootstrap-1.22/Prepare
+
+$(eval $(call GoCompiler/AddProfile,Bootstrap-1.22,$(BOOTSTRAP_1_22_BUILD_DIR),,bootstrap-1.22,$(GO_HOST_OS_ARCH)))
+
 # Host
 
 ifeq ($(GO_HOST_PIE_SUPPORTED),1)
@@ -279,8 +304,13 @@ define Host/Compile
                $(HOST_GO_VARS) \
        )
 
-       $(call GoCompiler/Host/Make, \
+       $(call GoCompiler/Bootstrap-1.22/Make, \
                GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_20_BUILD_DIR)" \
+               $(HOST_GO_VARS) \
+       )
+
+       $(call GoCompiler/Host/Make, \
+               GOROOT_BOOTSTRAP="$(BOOTSTRAP_1_22_BUILD_DIR)" \
                $(if $(HOST_GO_ENABLE_PIE),GO_LDFLAGS="-buildmode pie") \
                $(HOST_GO_VARS) \
        )