Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Wambold <tom5760@gmail.com>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Tom Wambold <tom5760@gmail.com>,
	Christian Stewart <christian@aperture.us>,
	Thomas Perale <thomas.perale@mind.be>
Subject: [Buildroot] [PATCH v3] package/go: go-bin host-go provider implies target support
Date: Sun, 18 May 2025 11:33:56 -0400	[thread overview]
Message-ID: <20250518153357.10003-1-tom5760@gmail.com> (raw)
In-Reply-To: <20250331153438.4103-1-tom5760@gmail.com>

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.

Update BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS to 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.

Signed-off-by: Tom Wambold <tom5760@gmail.com>

---
Changes v1 -> v2:
  - Added missing Signed-off-by

Changes v2 -> v3:
  - Remove new BR2_PACKAGE_HOST_GO_BIN_TARGET_ARCH_SUPPORTS symbol, and
    just re-use the HOST_ARCH_SUPPORTS symbol.  They were always the
    same value anyway.  Thanks for the feedback
    @thomas.petazzoni@bootlin.com!
---
 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

      parent reply	other threads:[~2025-05-18 15:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 15:42 [Buildroot] [PATCH] package/go: go-bin host-go provider implies target support Tom Wambold
2025-03-31 15:34 ` [Buildroot] [PATCH v2] " 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   ` Tom Wambold [this message]

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=20250518153357.10003-1-tom5760@gmail.com \
    --to=tom5760@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=christian@aperture.us \
    --cc=thomas.perale@mind.be \
    --cc=thomas.petazzoni@bootlin.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