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 for a single > >> target that is known to be special(ly bad) and not support LTO. > > > > Please make sure to test this change with a multilib-enabled ebuild > > with multiple ABIs enabled. I suspect the filter-lto call will cause > > differing results for the ABIs after the first. > > > > If that is the case, we may need to declare the relevant FLAGS > > variables with "local -x". > > > >>> Configuring source in > /var/tmp/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson ... > * abi_x86_32.x86: running multilib-minimal_abi_src_configure > meson setup --libdir lib --localstatedir /var/lib --prefix /usr > --sysconfdir /etc --wrap-mode nodownload --build.pkg-config-path > /usr/share/pkgconfig:/usr/share/pkgconfig --pkg-config-path > /usr/share/pkgconfig:/usr/share/pkgconfig --native-file > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.i686-pc-linux-gnu.x86.ini > -Db_pch=false -Dwerror=false -Db_lto=true -Db_lto_threads=4 > -Dbuildtype=plain -Ddefault_library=shared -Dbin_programs=false > -Dbin_contrib=false -Dbin_tests=false -Dzlib=disabled -Dlzma=disabled > -Dlz4=disabled --native-file > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.i686-pc-linux-gnu.x86.ini.local > /var/tmp/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson > /var/tmp/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_32.x86 > [...] > Native files : > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.i686-pc-linux-gnu.x86.ini > > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.i686-pc-linux-gnu.x86.ini.local > b_lto : true > b_lto_threads : 4 > > > > > * abi_x86_64.amd64: running multilib-minimal_abi_src_configure > meson setup --libdir lib64 --localstatedir /var/lib --prefix /usr > --sysconfdir /etc --wrap-mode nodownload --build.pkg-config-path > /usr/share/pkgconfig --pkg-config-path /usr/share/pkgconfig > --native-file > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini > -Db_pch=false -Dwerror=false -Db_lto=true -Db_lto_threads=4 > -Dbuildtype=plain -Ddefault_library=shared -Dbin_programs=true > -Dbin_contrib=true -Dbin_tests=false -Dzlib=enabled -Dlzma=enabled > -Dlz4=disabled --native-file > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini.local > /var/tmp/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson > /var/tmp/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_64.amd64 > [...] > Native files : > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini > > /var/tmp/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini.local > b_lto : true > b_lto_threads : 4 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 configure