public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site
@ 2022-12-06  9:03 James Le Cuirot
  2022-12-06 10:12 ` Sam James
  0 siblings, 1 reply; 4+ messages in thread
From: James Le Cuirot @ 2022-12-06  9:03 UTC (permalink / raw
  To: gentoo-dev; +Cc: James Le Cuirot

We were setting CBUILD within econf_build but not CHOST. crossdev's
/usr/share/config.site relies on both of these to decide whether to load
configure overrides needed when cross-compiling. Using the wrong
overrides leads to packages such as Python failing.

Doing this also avoids the need to duplicate the --build and --host
configure arguments.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
 eclass/toolchain-funcs.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index a184887ad3b9..61a29d1b6ea6 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -442,7 +442,8 @@ tc-env_build() {
 # @CODE
 econf_build() {
 	local CBUILD=${CBUILD:-${CHOST}}
-	tc-env_build econf --build=${CBUILD} --host=${CBUILD} "$@"
+	econf_env() { CHOST=${CBUILD} econf "$@"; }
+	tc-env_build econf_env "$@"
 }
 
 # @FUNCTION: tc-ld-is-gold
-- 
2.38.1



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

end of thread, other threads:[~2022-12-07 13:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06  9:03 [gentoo-dev] [PATCH] toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site James Le Cuirot
2022-12-06 10:12 ` Sam James
2022-12-06 21:47   ` James Le Cuirot
2022-12-07 13:25     ` Sam James

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