commit: 65f7023eaf9b4456a018a2e973df0b7f067a2600
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 6 08:55:29 2022 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Dec 6 21:46:05 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65f7023e
toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site
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 <AT> 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