From: Tom Wambold <tom5760@gmail.com>
To: buildroot@buildroot.org
Cc: Tom Wambold <tom5760@gmail.com>,
Christian Stewart <christian@aperture.us>,
Thomas Perale <thomas.perale@mind.be>
Subject: [Buildroot] [PATCH] package/go: go-bin host-go provider implies target support
Date: Fri, 14 Mar 2025 11:42:51 -0400 [thread overview]
Message-ID: <20250314154252.10248-1-tom5760@gmail.com> (raw)
The BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS configuration symbol is
used to determine if we can build Go packages for the target
architecture. Previously, this depended *only* on the
BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS symbol, which is true
only if the host system can bootstrap the Go compiler.
The go-bin package makes it unnecessary to bootstrap the Go compiler.
Also, some host architectures (i.e. arm64/aarch64) don't support
bootstrapping the compiler anyway.
Add a new symbol BR2_PACKAGE_HOST_GO_BIN_TARGET_ARCH_SUPPORTS to let
BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS depend on either being
able to bootstrap the compiler *OR* using the go-bin package. This
fixes being able to use the Go compiler to build target packages on an
arm64/aarch64 host system.
---
package/go/Config.in.host | 2 +-
package/go/go-bin/Config.in.host | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/package/go/Config.in.host b/package/go/Config.in.host
index 7e354b3298..f9b27cc4d8 100644
--- a/package/go/Config.in.host
+++ b/package/go/Config.in.host
@@ -2,7 +2,7 @@
config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
bool
default y
- depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS || BR2_PACKAGE_HOST_GO_BIN_TARGET_ARCH_SUPPORTS
# See https://go.dev/doc/install/source#environment
# See src/go/build/syslist.go for the list of supported architectures
depends on (BR2_arm && BR2_TOOLCHAIN_SUPPORTS_PIE) || BR2_aarch64 \
diff --git a/package/go/go-bin/Config.in.host b/package/go/go-bin/Config.in.host
index 6312c1b950..5fe1686fef 100644
--- a/package/go/go-bin/Config.in.host
+++ b/package/go/go-bin/Config.in.host
@@ -12,3 +12,8 @@ config BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
bool
default y
depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH != ""
+
+config BR2_PACKAGE_HOST_GO_BIN_TARGET_ARCH_SUPPORTS
+ bool
+ default y
+ depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH != ""
--
2.48.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2025-03-14 15:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 15:42 Tom Wambold [this message]
2025-03-31 15:34 ` [Buildroot] [PATCH v2] package/go: go-bin host-go provider implies target support Tom Wambold
2025-05-18 12:14 ` Thomas Petazzoni via buildroot
2025-05-18 14:47 ` Thomas Petazzoni via buildroot
2025-05-18 15:43 ` Tom Wambold
2025-05-25 7:13 ` Christian Stewart via buildroot
2025-07-19 13:12 ` Tom Wambold
2025-07-19 16:36 ` Christian Stewart via buildroot
2025-05-18 15:33 ` [Buildroot] [PATCH v3] " Tom Wambold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250314154252.10248-1-tom5760@gmail.com \
--to=tom5760@gmail.com \
--cc=buildroot@buildroot.org \
--cc=christian@aperture.us \
--cc=thomas.perale@mind.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox