public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
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>
Subject: [Buildroot] [PATCH 1/1] package/go: make pre-built compiler provide target support too
Date: Wed, 11 Jun 2025 18:21:51 +0200	[thread overview]
Message-ID: <20250611162152.32353-1-fl@n621.de> (raw)

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

             reply	other threads:[~2025-06-11 16:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 16:21 Florian Larysch [this message]
2025-07-06 16:40 ` [Buildroot] [PATCH 1/1] package/go: make pre-built compiler provide target support too 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

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=20250611162152.32353-1-fl@n621.de \
    --to=fl@n621.de \
    --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