[25.12] golang: add support for multiple versions#28446
Merged
GeorgeSapkin merged 5 commits intoopenwrt:openwrt-25.12from Jan 29, 2026
Merged
Conversation
Fixes: CVE-2025-61726 Fixes: CVE-2025-61728 Fixes: CVE-2025-61730 Fixes: CVE-2025-61731 Fixes: CVE-2025-68119 Fixes: CVE-2025-68121 Link: https://github.com/golang/go/issues?q=milestone%3AGo1.25.6+label%3ACherryPickApproved Signed-off-by: David Mandy <smallprogramzhusir@gmail.com> (cherry picked from commit dbaeeb3) Signed-off-by: George Sapkin <george@sapk.in>
Link: https://spdx.org/licenses/GPL-2.0-only.html Link: openwrt#28309 Signed-off-by: George Sapkin <george@sapk.in> (cherry picked from commit 51aa478)
Split bootstrap into a new package to enable multiple versions of go to reuse the same bootstrap. Add more source mirrors. Link: openwrt#28309 Signed-off-by: George Sapkin <george@sapk.in> (cherry picked from commit 662972a)
Add versioned package for 1.25 to enable having multiple host go versions side by side. Set default version to 1.25 in golang-values.mk Add unversioned dummy package to allow go-based packages to continue using the default go host version. Packages can use it by specifying: PKG_BUILD_DEPENDS:=golang/host or use a specific version out of the ones that are available in that branch by specifying: PKG_BUILD_DEPENDS:=golang1.25/host Host go is exposed to each package through PATH set in GO_PKG_BUILD_CONFIG_VARS and GO_PKG_VARS. Target go is installed through alternatives with the default version having higher priority. Newer versions can reuse older ones as bootstraps by setting GO_BOOTSTRAP_VERSION package variable to older version, e.g.: GO_BOOTSTRAP_VERSION:=1.24 All subpackages provide suffix-less names, e.g. golang, golang-src, etc. Default versions are marked as default variants. Link: openwrt#28309 Signed-off-by: George Sapkin <george@sapk.in> (cherry picked from commit ca501ee)
Move version definition to a helper file so multiple versions can be easily defined using it. Variables HOST_GO_VARS, PKG_GO_ASMFLAGS, PKG_GO_GCFLAGS, PKG_GO_INSTALL_ARGS, PKG_GO_LDFLAGS, PKG_GO_VARS, and PKG_GO_ZBOOTSTRAP_MODS are defined using conditional variable assignment and can be overridden for each go version. Link: openwrt#28309 Signed-off-by: George Sapkin <george@sapk.in> (cherry picked from commit 8958c99)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📦 Package Details
Maintainer: me
Description:
Backport #28378 and #28309 to 25.12
🧪 Run Testing Details
✅ Formalities