From 2ceadb19577788d278e69406a792100b4ed2f062 Mon Sep 17 00:00:00 2001 From: Milinda Brantini Date: Wed, 18 Sep 2024 23:48:26 +0800 Subject: [PATCH 1/3] golang: Update to 1.23.1 Go 1.23.1 (released 2024-09-05) includes security fixes to the encoding/gob, go/build/constraint, and go/parser packages. It also addresses bug fixes in the compiler, go command, runtime, and the database/sql, go/types, os, runtime/trace, and unique packages. Signed-off-by: Milinda Brantini --- lang/golang/golang/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index b1ee96c76de123..601b320701dc3d 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk -GO_VERSION_MAJOR_MINOR:=1.22 -GO_VERSION_PATCH:=7 +GO_VERSION_MAJOR_MINOR:=1.23 +GO_VERSION_PATCH:=1 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:=66432d87d85e0cfac3edffe637d5930fc4ddf5793313fe11e4a0f333023c879f +PKG_HASH:=6ee44e298379d146a5e5aa6b1c5b5d5f5d0a3365eabdd70741e6e21340ec3b0d PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=BSD-3-Clause From 83fbc47c6efa1625f266296d0daa56142d6bbe15 Mon Sep 17 00:00:00 2001 From: Milinda Brantini Date: Sun, 29 Sep 2024 23:36:35 +0800 Subject: [PATCH 2/3] golang: Optimized values to suit golang 1.23 Added GOARM64 and GORISCV64 in golang-build.sh. Drop deprecated GOROOT_FINAL in GoCompiler/Default/Make. Updated environment vars in golang-values.mk for GOARM64 and GORISCV64. Refined host build in golang/Makefile for openbsd_riscv64. Co-authored-by: Tianling Shen Signed-off-by: Milinda Brantini --- lang/golang/golang-build.sh | 2 +- lang/golang/golang-compiler.mk | 9 +++------ lang/golang/golang-values.mk | 2 ++ lang/golang/golang/Makefile | 3 +-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lang/golang/golang-build.sh b/lang/golang/golang-build.sh index fe8718ee761eb8..01df4aa427a5b8 100644 --- a/lang/golang/golang-build.sh +++ b/lang/golang/golang-build.sh @@ -120,7 +120,7 @@ build() { if [ "$GO_GO_GENERATE" = 1 ]; then log "Calling go generate" # shellcheck disable=SC2086 - GOOS='' GOARCH='' GO386='' GOARM='' GOMIPS='' GOMIPS64='' \ + GOOS='' GOARCH='' GO386='' GOARM='' GOARM64='' GOMIPS='' GOMIPS64='' GORISCV64=''\ go generate -v $targets log fi diff --git a/lang/golang/golang-compiler.mk b/lang/golang/golang-compiler.mk index 50cc44905165c8..44defed7b4442a 100644 --- a/lang/golang/golang-compiler.mk +++ b/lang/golang/golang-compiler.mk @@ -19,14 +19,11 @@ define GoCompiler/Default/CheckHost endef # $(1) source go root -# $(2) destination prefix -# $(3) go version id -# $(4) additional environment variables (optional) +# $(2) additional environment variables (optional) define GoCompiler/Default/Make ( \ cd "$(1)/src" ; \ - $(if $(2),GOROOT_FINAL="$(2)/lib/go-$(3)") \ - $(4) \ + $(2) \ $(BASH) make.bash \ $(if $(findstring s,$(OPENWRT_VERBOSE)),-v) \ --no-banner \ @@ -156,7 +153,7 @@ define GoCompiler/AddProfile # $$(1) additional environment variables (optional) define GoCompiler/$(1)/Make - $$(call GoCompiler/Default/Make,$(2),$(3),$(4),$$(1)) + $$(call GoCompiler/Default/Make,$(2),$$(1)) endef # $$(1) override install prefix (optional) diff --git a/lang/golang/golang-values.mk b/lang/golang/golang-values.mk index a2a10f04d33c26..d57de5f3256cb2 100644 --- a/lang/golang/golang-values.mk +++ b/lang/golang/golang-values.mk @@ -59,11 +59,13 @@ unexport \ # Architecture-specific environment variables: unexport \ GOARM \ + GOARM64 \ GO386 \ GOAMD64 \ GOMIPS \ GOMIPS64 \ GOPPC64 \ + GORISCV64 \ GOWASM # Environment variables for use with code coverage: diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index 601b320701dc3d..adc47a4361bae9 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -34,7 +34,6 @@ PKG_BUILD_FLAGS:=no-mips16 PKG_GO_PREFIX:=/usr PKG_GO_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR) -PKG_GO_ROOT:=$(PKG_GO_PREFIX)/lib/go-$(PKG_GO_VERSION_ID) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/go-$(PKG_VERSION) HOST_BUILD_PARALLEL:=1 @@ -65,6 +64,7 @@ HOST_GO_VALID_OS_ARCH:= \ wasip1_wasm \ \ freebsd_riscv64 \ + openbsd_riscv64 \ \ linux_ppc64 linux_ppc64le \ linux_mips linux_mipsle linux_mips64 linux_mips64le \ @@ -394,7 +394,6 @@ define Build/Compile cd "$(PKG_BUILD_DIR)/bin" ; \ export $(GO_PKG_TARGET_VARS) ; \ $(CP) go go-host ; \ - GOROOT_FINAL="$(PKG_GO_ROOT)" \ GO_GCC_HELPER_CC="$(TARGET_CC)" \ GO_GCC_HELPER_CXX="$(TARGET_CXX)" \ $(PKG_GO_VARS) \ From 3b533c597ab56859c373378cb3f1683bb03fa078 Mon Sep 17 00:00:00 2001 From: Milinda Brantini Date: Mon, 30 Sep 2024 00:01:34 +0800 Subject: [PATCH 3/3] ctop: Drop unused variable Co-authored-by: Tianling Shen Signed-off-by: Milinda Brantini --- utils/ctop/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/ctop/Makefile b/utils/ctop/Makefile index 09b8722b0b1ee4..e6122f0d86b45b 100644 --- a/utils/ctop/Makefile +++ b/utils/ctop/Makefile @@ -37,7 +37,6 @@ MAKE_PATH:=$(GO_PKG_WORK_DIR_NAME)/build/src/$(GO_PKG) MAKE_VARS += \ GOPATH=$(GO_PKG_BUILD_DIR) \ GOCACHE=$(GO_BUILD_CACHE_DIR) \ - GOROOT_FINAL=$(GO_TARGET_ROOT) \ CC="$(TARGET_CC)" \ CXX="$(TARGET_CXX)" \ $(GO_PKG_VARS)