1 |
On Tue, 2022-12-06 at 10:12 +0000, Sam James wrote: |
2 |
> |
3 |
> > On 6 Dec 2022, at 09:03, James Le Cuirot <chewi@g.o> wrote: |
4 |
> > |
5 |
> > We were setting CBUILD within econf_build but not CHOST. crossdev's |
6 |
> > /usr/share/config.site relies on both of these to decide whether to load |
7 |
> > configure overrides needed when cross-compiling. Using the wrong |
8 |
> > overrides leads to packages such as Python failing. |
9 |
> > |
10 |
> > Doing this also avoids the need to duplicate the --build and --host |
11 |
> > configure arguments. |
12 |
> > |
13 |
> > Signed-off-by: James Le Cuirot <chewi@g.o> |
14 |
> > --- |
15 |
> > eclass/toolchain-funcs.eclass | 3 ++- |
16 |
> > 1 file changed, 2 insertions(+), 1 deletion(-) |
17 |
> > |
18 |
> > diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass |
19 |
> > index a184887ad3b9..61a29d1b6ea6 100644 |
20 |
> > --- a/eclass/toolchain-funcs.eclass |
21 |
> > +++ b/eclass/toolchain-funcs.eclass |
22 |
> > @@ -442,7 +442,8 @@ tc-env_build() { |
23 |
> > # @CODE |
24 |
> > econf_build() { |
25 |
> > local CBUILD=${CBUILD:-${CHOST}} |
26 |
> > - tc-env_build econf --build=${CBUILD} --host=${CBUILD} "$@" |
27 |
> > + econf_env() { CHOST=${CBUILD} econf "$@"; } |
28 |
> > + tc-env_build econf_env "$@" |
29 |
> > } |
30 |
> > |
31 |
> > # @FUNCTION: tc-ld-is-gold |
32 |
> > -- |
33 |
> |
34 |
> Lgtm provided you've tested it in the relevant envs (which I'm sure you have). |
35 |
> |
36 |
> Curious how this didn't come up as a problem before, but it |
37 |
> seems fine! |
38 |
|
39 |
econf_build is not widely used, and you only added it to Python in June. It's |
40 |
been used in other packages for much longer, but Python explicitly checks that |
41 |
the size of a long is what it expects. I didn't see it with m68k because we |
42 |
don't have any overrides for that. You also might not see it going from amd64 |
43 |
to arm64 either with them both being 64-bit. The lack of m68k overrides makes |
44 |
me wonder if some of these are even needed any more. ac_cv_sizeof_* can |
45 |
seemingly be determined when cross-compiling now. |
46 |
|
47 |
Since we've already had some reports of success, I'm merging this now. |