Re: [gentoo-dev] [PATCH v2 4/5] distutils-r1.eclass: wire up meson-python to meson.eclass

2024-02-19 Thread Michał Górny
On Tue, 2024-02-20 at 01:14 -0500, Eli Schwartz wrote: > The meson-python build backend -- as the name suggests -- uses meson > under the hood. We have a meson eclass which does lots of useful things > pertinent to meson. Make sure it gets invoked, by prying out the options > that

[gentoo-dev] Re: [PATCH v2 3/5] meson.eclass: refactor src_configure into a setter function

2024-02-19 Thread Eli Schwartz
On 2/20/24 1:14 AM, Eli Schwartz wrote: > +# Calculate the command line which meson should use, and other relevant > +# variables. Invoke via "${mesonargs[@]}" in the calling environment. > +# This function is called from meson_src_configure. I'm sure someone probably has a better name than

Re: [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Sam James
Eli Schwartz writes: > [[PGP Signed Part:Undecided]] > On 2/20/24 1:24 AM, Mike Gilbert wrote: >> I'm afraid I get different results. Build log attached. Happy to help >> figure this out tomorrow. >> >> To test, I applied this patch and ran this: >> >> ABI_X86="32 x32 64" CFLAGS="-O2 -pipe

Re: [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Eli Schwartz
On 2/20/24 1:33 AM, Eli Schwartz wrote: > On 2/20/24 1:24 AM, Mike Gilbert wrote: >> I'm afraid I get different results. Build log attached. Happy to help >> figure this out tomorrow. >> >> To test, I applied this patch and ran this: >> >> ABI_X86="32 x32 64" CFLAGS="-O2 -pipe -march=amdfam10

Re: [gentoo-dev] [PATCH 3/3] distutils-r1.eclass: fix src_configure to handle flag-o-matic correctly

2024-02-19 Thread Michał Górny
On Mon, 2024-02-19 at 23:26 -0500, Eli Schwartz wrote: > Use of python_configure_all is a bit broken, because distutils-r1 is a > bit broken. It has the intriguing value-claim that *FLAGS shall be > modified with local -x as part of run-phase, which means that all > modifications are reset as soon

[gentoo-dev] [PATCH v2 5/5] distutils-r1.eclass: fix src_configure to handle flag-o-matic correctly

2024-02-19 Thread Eli Schwartz
Use of python_configure_all is a bit broken, because distutils-r1 is a bit broken. It has the intriguing value-claim that *FLAGS shall be modified with local -x as part of run-phase, which means that all modifications are reset as soon as any given phase exits. Including sub-phases. If you make

[gentoo-dev] [PATCH v2 4/5] distutils-r1.eclass: wire up meson-python to meson.eclass

2024-02-19 Thread Eli Schwartz
The meson-python build backend -- as the name suggests -- uses meson under the hood. We have a meson eclass which does lots of useful things pertinent to meson. Make sure it gets invoked, by prying out the options that meson_src_configure would use and setting passing them as our seed values for

[gentoo-dev] [PATCH v2 3/5] meson.eclass: refactor src_configure into a setter function

2024-02-19 Thread Eli Schwartz
This is necessary in order to get at the implementation of `meson setup` from other eclasses, which do not simply call meson_src_configure. The intended use case is distutils-r1, where a python build backend wraps meson and needs its arguments while calling meson on its own. This allows

[gentoo-dev] [PATCH v2 2/5] meson.eclass: prefer -D buildtype instead of --buildtype

2024-02-19 Thread Eli Schwartz
Because that is the logic which meson-python hardcodes, and meson needs to match calling convention. Signed-off-by: Eli Schwartz --- v2: new patch eclass/meson.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/meson.eclass b/eclass/meson.eclass index

[gentoo-dev] [PATCH v2 1/5] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Eli Schwartz
meson's builtin LTO support allows meson to introspect whether LTO is enabled and do some fancy things, such as forcing LTO off for a single target that is known to be special(ly bad) and not support LTO. Signed-off-by: Eli Schwartz --- no change eclass/meson.eclass | 36

[gentoo-dev] [PATCH v2 0/5] eclass updates for meson <> distutils <> LTO

2024-02-19 Thread Eli Schwartz
v2 answers the question: how to deal with accumulated mesonargs without actually *running* meson_src_configure before gpep517 Eli Schwartz (5): meson.eclass: wire up LTO support directly into the meson options meson.eclass: prefer -D buildtype instead of --buildtype meson.eclass: refactor

Re: [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Eli Schwartz
On 2/20/24 1:24 AM, Mike Gilbert wrote: > I'm afraid I get different results. Build log attached. Happy to help > figure this out tomorrow. > > To test, I applied this patch and ran this: > > ABI_X86="32 x32 64" CFLAGS="-O2 -pipe -march=amdfam10 -flto=2" ebuild > zstd-1.5.5-r1.ebuild clean

Re: [gentoo-dev] [PATCH 2/3] distutils-r1.eclass: wire up meson-python to meson.eclass

2024-02-19 Thread Michał Górny
On Mon, 2024-02-19 at 23:26 -0500, Eli Schwartz wrote: > The meson-python build backend -- as the name suggests -- uses meson > under the hood. We have a meson eclass which does lots of useful things > pertinent to meson. Make sure it gets invoked. > > Signed-off-by: Eli Schwartz > --- >

Re: [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Mike Gilbert
On Tue, Feb 20, 2024 at 1:09 AM Eli Schwartz wrote: > > On 2/20/24 12:58 AM, Mike Gilbert wrote: > > On Mon, Feb 19, 2024 at 11:26 PM Eli Schwartz wrote: > >> > >> meson's builtin LTO support allows meson to introspect whether LTO is > >> enabled and do some fancy things, such as forcing LTO off

Re: [gentoo-dev] Re: [PATCH] check-reqs.eclass: more disk checks

2024-02-19 Thread Michał Górny
On Mon, 2024-02-19 at 22:14 +, Robin H. Johnson wrote: > On Mon, Feb 19, 2024 at 02:08:32PM -0800, Robin H. Johnson wrote: > > Allow checking more disk space, for users with many split volumes and > > ever-larger packages. > > > > gentoo-kernel-bin: > > / >=350MB/version (in /lib/modules)

Re: [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Eli Schwartz
On 2/20/24 12:58 AM, Mike Gilbert wrote: > On Mon, Feb 19, 2024 at 11:26 PM Eli Schwartz wrote: >> >> meson's builtin LTO support allows meson to introspect whether LTO is >> enabled and do some fancy things, such as forcing LTO off for a single >> target that is known to be special(ly bad) and

Re: [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Mike Gilbert
On Mon, Feb 19, 2024 at 11:26 PM Eli Schwartz wrote: > > meson's builtin LTO support allows meson to introspect whether LTO is > enabled and do some fancy things, such as forcing LTO off for a single > target that is known to be special(ly bad) and not support LTO. Please make sure to test this

Re: [gentoo-dev] [PATCH] check-reqs.eclass: more disk checks

2024-02-19 Thread Andrew Ammerlaan
On 19 February 2024 23:08:32 CET, "Robin H. Johnson" wrote: >Allow checking more disk space, for users with many split volumes and >ever-larger packages. > >gentoo-kernel-bin: >/ >=350MB/version (in /lib/modules) >/boot >=40MB/version > The problem here is that the kernel is not always

Re: [gentoo-dev] [PATCH 2/3] distutils-r1.eclass: wire up meson-python to meson.eclass

2024-02-19 Thread Eli Schwartz
On 2/19/24 11:42 PM, Sam James wrote: > > Eli Schwartz writes: > >> The meson-python build backend -- as the name suggests -- uses meson >> under the hood. We have a meson eclass which does lots of useful things >> pertinent to meson. Make sure it gets invoked. >> > > Maybe check a sample (or

Re: [gentoo-dev] [PATCH 2/3] distutils-r1.eclass: wire up meson-python to meson.eclass

2024-02-19 Thread Sam James
Eli Schwartz writes: > The meson-python build backend -- as the name suggests -- uses meson > under the hood. We have a meson eclass which does lots of useful things > pertinent to meson. Make sure it gets invoked. > Maybe check a sample (or ideally all) of the meson-python reverse

Re: [gentoo-dev] [PATCH 0/3] eclass updates for meson <> distutils <> LTO

2024-02-19 Thread Sam James
Eli Schwartz writes: > Mainly motivated by some upstream work I did with dev-python/scipy, > which has some ancient code that will never be updated to work with LTO, > and some nice new code that works great. > > The first patch is a nice improvement on its own. The second one makes > limited

Re: [gentoo-dev] [PATCH] check-reqs.eclass: more disk checks

2024-02-19 Thread Sam James
"Robin H. Johnson" writes: > Allow checking more disk space, for users with many split volumes and > ever-larger packages. > > gentoo-kernel-bin: > / >=350MB/version (in /lib/modules) > /boot >=40MB/version > > rust-bin: > /opt >=450MB/version > LGTM, but give a bit of time for other

[gentoo-dev] [PATCH 3/3] distutils-r1.eclass: fix src_configure to handle flag-o-matic correctly

2024-02-19 Thread Eli Schwartz
Use of python_configure_all is a bit broken, because distutils-r1 is a bit broken. It has the intriguing value-claim that *FLAGS shall be modified with local -x as part of run-phase, which means that all modifications are reset as soon as any given phase exits. Including sub-phases. If you make

[gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options

2024-02-19 Thread Eli Schwartz
meson's builtin LTO support allows meson to introspect whether LTO is enabled and do some fancy things, such as forcing LTO off for a single target that is known to be special(ly bad) and not support LTO. Signed-off-by: Eli Schwartz --- eclass/meson.eclass | 36

[gentoo-dev] [PATCH 2/3] distutils-r1.eclass: wire up meson-python to meson.eclass

2024-02-19 Thread Eli Schwartz
The meson-python build backend -- as the name suggests -- uses meson under the hood. We have a meson eclass which does lots of useful things pertinent to meson. Make sure it gets invoked. Signed-off-by: Eli Schwartz --- eclass/distutils-r1.eclass | 6 +- 1 file changed, 5 insertions(+), 1

[gentoo-dev] [PATCH 0/3] eclass updates for meson <> distutils <> LTO

2024-02-19 Thread Eli Schwartz
Mainly motivated by some upstream work I did with dev-python/scipy, which has some ancient code that will never be updated to work with LTO, and some nice new code that works great. The first patch is a nice improvement on its own. The second one makes limited sense without the third one. Eli

[gentoo-dev] Re: [PATCH] check-reqs.eclass: more disk checks

2024-02-19 Thread Robin H. Johnson
On Mon, Feb 19, 2024 at 02:08:32PM -0800, Robin H. Johnson wrote: > Allow checking more disk space, for users with many split volumes and > ever-larger packages. > > gentoo-kernel-bin: > / >=350MB/version (in /lib/modules) > /boot >=40MB/version > > rust-bin: > /opt >=450MB/version Meta: Is

[gentoo-dev] [PATCH] check-reqs.eclass: more disk checks

2024-02-19 Thread Robin H. Johnson
Allow checking more disk space, for users with many split volumes and ever-larger packages. gentoo-kernel-bin: / >=350MB/version (in /lib/modules) /boot >=40MB/version rust-bin: /opt >=450MB/version Signed-off-by: Robin H. Johnson --- eclass/check-reqs.eclass | 44