Skip to content

Conversation

@GeorgeSapkin
Copy link
Member

📦 Package Details

Maintainer: me

Description:

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.


🧪 Run Testing Details

  • OpenWrt Version: 25.12-rc3
  • OpenWrt Target/Subtarget: x86/64
  • OpenWrt Device: QEMU

Tested various permutations of the aforementioned configuration options.

Tested building and running AdGuard Home, CoreDNS, Syncthing and Tailscale.


✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

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 <[email protected]>
@GeorgeSapkin GeorgeSapkin merged commit 9d8ac9d into openwrt:master Feb 4, 2026
12 checks passed
@GeorgeSapkin GeorgeSapkin deleted the golang-allow-skipping-bootstrap branch February 4, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant