public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/go: make pre-built compiler provide target support too
@ 2025-06-11 16:21 Florian Larysch
  2025-07-06 16:40 ` Romain Naour via buildroot
  2025-07-14 14:52 ` [Buildroot] [PATCH v2 " Florian Larysch
  0 siblings, 2 replies; 13+ messages in thread
From: Florian Larysch @ 2025-06-11 16:21 UTC (permalink / raw)
  To: buildroot; +Cc: Christian Stewart, Thomas Perale, Florian Larysch

Currently, BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS depends on
BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS, which transitively
depends on stage1 bootstrapping support, which is only present for
x86/x86_64 and arm.

When building on a host system which doesn't support a full bootstrap
(like aarch64), we can fall back on the pre-built toolchain. However, in
that case, those symbols are all false, making the internal state of the
build system inconsistent. In particular, this causes none of the
environment variables like GOARCH to be set and thus the Go compiler
will perform a native build instead of a cross build.

Fix this by also allowing BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS to
fulfill the dependency.

Signed-off-by: Florian Larysch <fl@n621.de>
---
 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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-08-14 20:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Buildroot] [PATCH v2 " Florian Larysch
2025-07-28 14:12   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox