1 |
> On 6 Dec 2022, at 09:03, James Le Cuirot <chewi@g.o> wrote: |
2 |
> |
3 |
> We were setting CBUILD within econf_build but not CHOST. crossdev's |
4 |
> /usr/share/config.site relies on both of these to decide whether to load |
5 |
> configure overrides needed when cross-compiling. Using the wrong |
6 |
> overrides leads to packages such as Python failing. |
7 |
> |
8 |
> Doing this also avoids the need to duplicate the --build and --host |
9 |
> configure arguments. |
10 |
> |
11 |
> Signed-off-by: James Le Cuirot <chewi@g.o> |
12 |
> --- |
13 |
> eclass/toolchain-funcs.eclass | 3 ++- |
14 |
> 1 file changed, 2 insertions(+), 1 deletion(-) |
15 |
> |
16 |
> diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass |
17 |
> index a184887ad3b9..61a29d1b6ea6 100644 |
18 |
> --- a/eclass/toolchain-funcs.eclass |
19 |
> +++ b/eclass/toolchain-funcs.eclass |
20 |
> @@ -442,7 +442,8 @@ tc-env_build() { |
21 |
> # @CODE |
22 |
> econf_build() { |
23 |
> local CBUILD=${CBUILD:-${CHOST}} |
24 |
> - tc-env_build econf --build=${CBUILD} --host=${CBUILD} "$@" |
25 |
> + econf_env() { CHOST=${CBUILD} econf "$@"; } |
26 |
> + tc-env_build econf_env "$@" |
27 |
> } |
28 |
> |
29 |
> # @FUNCTION: tc-ld-is-gold |
30 |
> -- |
31 |
|
32 |
Lgtm provided you've tested it in the relevant envs (which I'm sure you have). |
33 |
|
34 |
Curious how this didn't come up as a problem before, but it |
35 |
seems fine! |
36 |
|
37 |
Thanks! |
38 |
|
39 |
Best, |
40 |
sam |