Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Cc: James Le Cuirot <chewi@g.o>
Subject: [gentoo-dev] [PATCH] toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site
Date: Tue, 06 Dec 2022 09:03:59
Message-Id: 20221206090324.16922-1-chewi@gentoo.org
1 We were setting CBUILD within econf_build but not CHOST. crossdev's
2 /usr/share/config.site relies on both of these to decide whether to load
3 configure overrides needed when cross-compiling. Using the wrong
4 overrides leads to packages such as Python failing.
5
6 Doing this also avoids the need to duplicate the --build and --host
7 configure arguments.
8
9 Signed-off-by: James Le Cuirot <chewi@g.o>
10 ---
11 eclass/toolchain-funcs.eclass | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
13
14 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
15 index a184887ad3b9..61a29d1b6ea6 100644
16 --- a/eclass/toolchain-funcs.eclass
17 +++ b/eclass/toolchain-funcs.eclass
18 @@ -442,7 +442,8 @@ tc-env_build() {
19 # @CODE
20 econf_build() {
21 local CBUILD=${CBUILD:-${CHOST}}
22 - tc-env_build econf --build=${CBUILD} --host=${CBUILD} "$@"
23 + econf_env() { CHOST=${CBUILD} econf "$@"; }
24 + tc-env_build econf_env "$@"
25 }
26
27 # @FUNCTION: tc-ld-is-gold
28 --
29 2.38.1

Replies