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>