Support building release candidates by setting GO_VERSION_RC to the
release candidate number, e.g. GO_VERSION_RC:=2, and unsetting
GO_VERSION_PATCH.
Signed-off-by: George Sapkin <george@sapk.in>
Add missing 386 and arm64 suffixes to -installsuffix so as not to
accidentally mix incompatible binaries.
Signed-off-by: George Sapkin <george@sapk.in>
Introduce a new configuration option - GOLANG_BUILD_BOOTSTRAP - that
defaults to enabled:
- When enabled, build the local bootstrap instead of using an external
one for host Go. If GOLANG_EXTERNAL_BOOTSTRAP_ROOT is set, skip the
initial 1.4 step.
- When disabled, let Go auto-detect the toolchain or use the toolchain
specified in GOLANG_EXTERNAL_BOOTSTRAP_ROOT to skip building the
bootstrap and build host Go using that toolchain directly. Configured
toolchain must be compatible with the current version of Go.
HOST_BUILD_DEPENDS cannot be conditional, so some Makefile juggling is
needed.
Put menu config under bootstrap only.
Remove unnecessary package-related flags from host-only bootstrap.
Signed-off-by: George Sapkin <george@sapk.in>
Split misc sources and test data into separate packages. Reduces target
src package size by a third.
Move architecture-dependent generated source from src to the main
package.
Mark doc, misc, src and tests packages with PKGARCH:=all as they don't
have any architecture-specific files.
Fix stripping and strip compiler only.
Fixes: c137c382 ("golang: new packages")
Link: https://github.com/openwrt/packages/pull/28445
Suggested-by: Jeffery To <jeffery.to@gmail.com>
Signed-off-by: George Sapkin <george@sapk.in>
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: https://github.com/openwrt/packages/pull/28309
Signed-off-by: George Sapkin <george@sapk.in>
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: https://github.com/openwrt/packages/pull/28309
Signed-off-by: George Sapkin <george@sapk.in>
go1.25.2 (released 2025-10-07) includes security fixes to the
archive/tar, crypto/tls, crypto/x509, encoding/asn1, encoding/pem,
net/http, net/mail, net/textproto, and net/url packages, as well as
bug fixes to the compiler, the runtime, and the context, debug/pe,
net/http, os, and sync/atomic packages.
go1.25.3 (released 2025-10-13) includes fixes to the crypto/x509
package.
Changelog: https://go.dev/doc/devel/release#go1.25.minor
Fixes:
- CVE-2025-47912
- CVE-2025-58183
- CVE-2025-58185
- CVE-2025-58186
- CVE-2025-58187
- CVE-2025-58188
- CVE-2025-58189
- CVE-2025-61723
- CVE-2025-61724
- CVE-2025-61725
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
e5500 is the only powerpc64 target we have in tree, but it's not
supported by golang[1]. Since it's hard to opt e5500 out from the
supported arch list, simply remove powerpc64 from it for now.
1. https://github.com/golang/go/issues/19074
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
go1.24.1 (released 2025-03-04) includes security fixes to the net/http
package, as well as bug fixes to cgo, the compiler, the go command,
and the reflect, runtime, and syscall packages.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
go1.23.5 (released 2025-01-16) includes security fixes to the
crypto/x509 and net/http packages, as well as bug fixes to the
compiler, the runtime, and the net package.
go1.23.6 (released 2025-02-04) includes security fixes to the
crypto/elliptic package, as well as bug fixes to the compiler
and the go command.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
go1.23.4 (released 2024-12-03) includes fixes to the compiler, the
runtime, the trace command, and the syscall package.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
go1.23.3 (released 2024-11-06) includes fixes to the linker,
the runtime, and the net/http, os, and syscall packages.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
go1.23.2 (released 2024-10-01) includes fixes to the compiler, cgo,
the runtime, and the maps, os, os/exec, time, and unique packages.
Signed-off-by: Milinda Brantini <C_A_T_T_E_R_Y@outlook.com>
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 <cnsztl@immortalwrt.org>
Signed-off-by: Milinda Brantini <C_A_T_T_E_R_Y@outlook.com>
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 <C_A_T_T_E_R_Y@outlook.com>
go1.22.7(released 2024-09-05)includes security fixes to the encoding/gob,
go/build/constraint, and go/parser packages,
as well as bug fixes to the fix command and the runtime.
Signed-off-by: Milinda Brantini <C_A_T_T_E_R_Y@outlook.com>
go1.22.6 (released 2024-08-06) includes fixes to the go command,
the compiler, the linker, the trace command, the covdata command,
and the bytes, go/types, and os/exec packages.
Signed-off-by: Milinda Brantini <C_A_T_T_E_R_Y@outlook.com>
go1.22.5 (2024-07-02) includes security fixes to the net/http package,
as well as bug fixes to the compiler, cgo, the go command, the linker,
the runtime, and the crypto/tls, go/types, net, net/http, and os/exec.
Signed-off-by: Milinda Brantini <C_A_T_T_E_R_Y@outlook.com>
go1.22.4 (released 2024-06-04) includes
security fixes to the archive/zip and net/netip packages,
as well as bug fixes to the compiler,
the go command, the linker,
the runtime, and the os package.
Signed-off-by: Milinda Brantini <C_A_T_T_E_R_Y@outlook.com>
go1.22.3 (released 2024-05-07) includes security fixes to the go command
and the net package, as well as bug fixes to the compiler, the runtime,
and the net/http package.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Go 1.22.1 contains the following security fixes:
- CVE-2024-24783:
crypto/x509: Verify panics on certificates with an unknown public key
algorithm
- CVE-2023-45290
net/http: memory exhaustion in Request.ParseMultipartForm
- CVE-2023-45289
net/http, net/http/cookiejar: incorrect forwarding of sensitive headers
and cookies on HTTP redirect
- CVE-2024-24785
html/template: errors returned from MarshalJSON methods may break
template escaping
- CVE-2024-24784
net/mail: comments in display names are incorrectly handled
https://go.dev/doc/devel/release#go1.22.1https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg
Signed-off-by: Zephyr Lykos <git@mochaa.ws>
go1.21.6 (released 2024-01-09) includes fixes to the compiler,
the runtime, and the crypto/tls, maps, and runtime/pprof packages.
go1.21.7 (released 2024-02-06) includes fixes to the compiler,
the go command, the runtime, and the crypto/x509 package.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>