golang: Fix host build compatibility with GCC 15
authorJeffery To <[email protected]>
Thu, 5 Jun 2025 13:37:53 +0000 (21:37 +0800)
committerJosef Schlehofer <[email protected]>
Thu, 5 Jun 2025 18:45:14 +0000 (20:45 +0200)
Fixes https://github.com/openwrt/packages/issues/26446.

Signed-off-by: Jeffery To <[email protected]>
lang/golang/golang/Makefile

index 91bc80ee35562a3fac64558f2a44230bd1d8e3ec..a35c2c01f7184ad2e48361236366472d9175096d 100644 (file)
@@ -12,7 +12,7 @@ GO_VERSION_PATCH:=3
 
 PKG_NAME:=golang
 PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 GO_SOURCE_URLS:=https://dl.google.com/go/ \
                 https://mirrors.ustc.edu.cn/golang/ \
@@ -292,6 +292,7 @@ endef
 define Host/Compile
        $(call GoCompiler/Bootstrap/Make, \
                $(HOST_GO_VARS) \
+               CC="$(HOSTCC_NOCACHE) -std=gnu17" \
        )
 
        $(call GoCompiler/Bootstrap-1.17/Make, \