* [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
* Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site
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
0 siblings, 1 reply; 4+ messages in thread
From: Sam James @ 2022-12-06 10:12 UTC (permalink / raw
To: gentoo-dev; +Cc: James Le Cuirot
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
> On 6 Dec 2022, at 09:03, James Le Cuirot <chewi@gentoo.org> wrote:
>
> 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
> --
Lgtm provided you've tested it in the relevant envs (which I'm sure you have).
Curious how this didn't come up as a problem before, but it
seems fine!
Thanks!
Best,
sam
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site
2022-12-06 10:12 ` Sam James
@ 2022-12-06 21:47 ` James Le Cuirot
2022-12-07 13:25 ` Sam James
0 siblings, 1 reply; 4+ messages in thread
From: James Le Cuirot @ 2022-12-06 21:47 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1977 bytes --]
On Tue, 2022-12-06 at 10:12 +0000, Sam James wrote:
>
> > On 6 Dec 2022, at 09:03, James Le Cuirot <chewi@gentoo.org> wrote:
> >
> > 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
> > --
>
> Lgtm provided you've tested it in the relevant envs (which I'm sure you have).
>
> Curious how this didn't come up as a problem before, but it
> seems fine!
econf_build is not widely used, and you only added it to Python in June. It's
been used in other packages for much longer, but Python explicitly checks that
the size of a long is what it expects. I didn't see it with m68k because we
don't have any overrides for that. You also might not see it going from amd64
to arm64 either with them both being 64-bit. The lack of m68k overrides makes
me wonder if some of these are even needed any more. ac_cv_sizeof_* can
seemingly be determined when cross-compiling now.
Since we've already had some reports of success, I'm merging this now.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: Set CHOST within econf_build to fix config.site
2022-12-06 21:47 ` James Le Cuirot
@ 2022-12-07 13:25 ` Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-12-07 13:25 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
> On 6 Dec 2022, at 21:47, James Le Cuirot <chewi@gentoo.org> wrote:
>
> On Tue, 2022-12-06 at 10:12 +0000, Sam James wrote:
>> [snip]
>> Lgtm provided you've tested it in the relevant envs (which I'm sure you have).
>>
>> Curious how this didn't come up as a problem before, but it
>> seems fine!
>
> econf_build is not widely used, and you only added it to Python in June. It's
> been used in other packages for much longer, but Python explicitly checks that
> the size of a long is what it expects. I didn't see it with m68k because we
> don't have any overrides for that. You also might not see it going from amd64
> to arm64 either with them both being 64-bit. The lack of m68k overrides makes
> me wonder if some of these are even needed any more. ac_cv_sizeof_* can
> seemingly be determined when cross-compiling now.
>
> Since we've already had some reports of success, I'm merging this now.
Thank you for explaining! That makes sense now.
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]
^ permalink raw reply [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