From: Florian Larysch <fl@n621.de>
To: buildroot@buildroot.org
Cc: Christian Stewart <christian@aperture.us>,
Thomas Perale <thomas.perale@mind.be>,
Florian Larysch <fl@n621.de>,
"Yann E. MORIN" <yann.morin@orange.com>,
Romain Naour <romain.naour@smile.fr>
Subject: [Buildroot] [PATCH v2 1/1] package/go: make pre-built compiler provide target support too
Date: Mon, 14 Jul 2025 16:52:41 +0200 [thread overview]
Message-ID: <20250714145242.27516-1-fl@n621.de> (raw)
In-Reply-To: <20250611162152.32353-1-fl@n621.de>
All Go packages must depend on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS,
which ensures that we do have a Go compiler available for that target.
BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS is currently restricted to the
availability of a full host Go compiler bootstrap. However, there are
architectures like AArch64 for which a full bootstrap is not supported.
Thus, currently, on an AArch64 host, we can't build Go packages (for
target or host), because we can't bootstrap a Go compiler.
However, note that a single Go compiler can generate code for all the
architectures supported by Go and for some host architectures, there are
pre-built toolchains available. When host-go-bin was added in commit
7b2a164b7460 ("package/go/go-bin: new host-go provider"), the host
dependency was properly accounted for: It is already possible to build
host-go packages with go-bin. However, the fact that a Go compiler, in
addition to its native target, can also generate code for all supported
architectures, was missed at the time.
Thus, we can fix this problem by relaxing the condition under which
BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS is set to allowing go-bin
along with go-bootstrap. This allows a situation where the host can't
bootstrap, but for which there is a pre-built toolchain to build Go
packages for a supported target.
Signed-off-by: Florian Larysch <fl@n621.de>
Cc: Yann E. MORIN <yann.morin@orange.com>
Cc: Romain Naour <romain.naour@smile.fr>
---
v1->v2:
- Reworded commit message after discussion with Romain and Yann.
package/go/Config.in.host | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/go/Config.in.host b/package/go/Config.in.host
index 7e354b3298..a42e37f90b 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_HOST_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 \
--
2.49.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-07-14 14:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 16:21 [Buildroot] [PATCH 1/1] package/go: make pre-built compiler provide target support too Florian Larysch
2025-07-06 16:40 ` Romain Naour via buildroot
2025-07-06 17:13 ` Florian Larysch
2025-07-06 19:59 ` Romain Naour via buildroot
2025-07-07 15:43 ` Florian Larysch
2025-07-08 5:04 ` yann.morin
2025-07-09 14:59 ` Florian Larysch
2025-07-10 8:35 ` yann.morin
2025-07-14 14:52 ` Florian Larysch [this message]
2025-07-28 14:12 ` [Buildroot] [PATCH v2 " Florian Larysch
2025-07-29 11:53 ` yann.morin
2025-08-09 17:27 ` Romain Naour via buildroot
2025-08-14 20:31 ` Thomas Perale via buildroot
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=20250714145242.27516-1-fl@n621.de \
--to=fl@n621.de \
--cc=buildroot@buildroot.org \
--cc=christian@aperture.us \
--cc=romain.naour@smile.fr \
--cc=thomas.perale@mind.be \
--cc=yann.morin@orange.com \
/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