From: Mike Gilbert <floppym@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options
Date: Tue, 20 Feb 2024 01:24:19 -0500 [thread overview]
Message-ID: <CAJ0EP42T9DTFw0jU3TyU=MoUg28H-LHz2s1BAHLvOYyCK_a3VA@mail.gmail.com> (raw)
In-Reply-To: <f30e4241-9539-4b04-8339-7202775f4a2b@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3415 bytes --]
On Tue, Feb 20, 2024 at 1:09 AM Eli Schwartz <eschwartz93@gmail.com> wrote:
>
> On 2/20/24 12:58 AM, Mike Gilbert wrote:
> > On Mon, Feb 19, 2024 at 11:26 PM Eli Schwartz <eschwartz93@gmail.com> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: app-arch:zstd-1.5.5-r1:20240220-061809.log --]
[-- Type: text/x-log; charset="x-binaryenc"; name="app-arch:zstd-1.5.5-r1:20240220-061809.log", Size: 11952 bytes --]
^[[32m * ^[[39;49;00mPackage: app-arch/zstd-1.5.5-r1:0/1
^[[32m * ^[[39;49;00mRepository: gentoo
^[[32m * ^[[39;49;00mMaintainer: base-system@gentoo.org
^[[32m * ^[[39;49;00mUSE: abi_x86_32 abi_x86_64 abi_x86_x32 amd64 elibc_glibc kernel_linux lzma zlib
^[[32m * ^[[39;49;00mFEATURES: ccache network-sandbox preserve-libs sandbox userpriv usersandbox
^[[32m * ^[[39;49;00mPackage: app-arch/zstd-1.5.5-r1:0/1
^[[32m * ^[[39;49;00mRepository: gentoo
^[[32m * ^[[39;49;00mMaintainer: base-system@gentoo.org
^[[32m * ^[[39;49;00mUSE: abi_x86_32 abi_x86_64 abi_x86_x32 amd64 elibc_glibc kernel_linux lzma zlib
^[[32m * ^[[39;49;00mFEATURES: ccache network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking zstd-1.5.5.tar.gz to /x/portage/app-arch/zstd-1.5.5-r1/work
>>> Source unpacked in /x/portage/app-arch/zstd-1.5.5-r1/work
>>> Preparing source in /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson ...
^[[32m*^[[0m Applying zstd-1.5.4-no-find-valgrind.patch ...
^[[A^[[92C ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
>>> Source prepared.
>>> Configuring source in /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson ...
^[[32m*^[[0m 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 /x/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=2 --buildtype plain -Ddefault_library=shared -Dbin_programs=false -Dbin_contrib=false -Dbin_tests=false -Dzlib=disabled -Dlzma=disabled -Dlz4=disabled --native-file /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.i686-pc-linux-gnu.x86.ini.local /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_32.x86
The Meson build system
Version: 1.3.1
Source dir: /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson
Build dir: /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_32.x86
Build type: native build
Program GetZstdLibraryVersion.py found: YES (/usr/bin/python3.12 /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson/GetZstdLibraryVersion.py)
Project name: zstd
Project version: 1.5.5
C compiler for the host machine: x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse (gcc 13.2.1 "x86_64-pc-linux-gnu-gcc (Gentoo 13.2.1_p20240113-r1 p12) 13.2.1 20240113")
C linker for the host machine: x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse ld.bfd 2.41
C++ compiler for the host machine: x86_64-pc-linux-gnu-g++ -m32 -mfpmath=sse (gcc 13.2.1 "x86_64-pc-linux-gnu-g++ (Gentoo 13.2.1_p20240113-r1 p12) 13.2.1 20240113")
C++ linker for the host machine: x86_64-pc-linux-gnu-g++ -m32 -mfpmath=sse ld.bfd 2.41
Host machine cpu family: x86
Host machine cpu: i686
Library m found: YES
Run-time dependency threads found: YES
Dependency zlib skipped: feature zlib disabled
Dependency liblzma skipped: feature lzma disabled
Dependency liblz4 skipped: feature lz4 disabled
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C++ supports arguments -Wundef: YES
Compiler for C++ supports arguments -Wshadow: YES
Compiler for C++ supports arguments -Wcast-align: YES
Compiler for C++ supports arguments -Wcast-qual: YES
Message: Enable legacy support back to version 0.5
Message: Enable multi-threading support
Found pkg-config: YES (/usr/bin/x86_64-pc-linux-gnu-pkg-config) 2.1.0
Build targets in project: 2
zstd 1.5.5
User defined options
Native files : /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.i686-pc-linux-gnu.x86.ini
/x/portage/app-arch/zstd-1.5.5-r1/temp/meson.i686-pc-linux-gnu.x86.ini.local
build.pkg_config_path: /usr/share/pkgconfig:/usr/share/pkgconfig
buildtype : plain
default_library : shared
libdir : lib
localstatedir : /var/lib
pkg_config_path : /usr/share/pkgconfig:/usr/share/pkgconfig
prefix : /usr
sysconfdir : /etc
werror : false
wrap_mode : nodownload
b_lto : true
b_lto_threads : 2
b_pch : false
bin_contrib : false
bin_programs : false
bin_tests : false
lz4 : disabled
lzma : disabled
zlib : disabled
Found ninja-1.11.1 at /usr/bin/ninja
^[[32m*^[[0m abi_x86_x32.x32: running multilib-minimal_abi_src_configure
meson setup --libdir libx32 --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 /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnux32.x32.ini -Db_pch=false -Dwerror=false -Db_lto=false --buildtype plain -Ddefault_library=shared -Dbin_programs=false -Dbin_contrib=false -Dbin_tests=false -Dzlib=disabled -Dlzma=disabled -Dlz4=disabled --native-file /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnux32.x32.ini.local /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_x32.x32
The Meson build system
Version: 1.3.1
Source dir: /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson
Build dir: /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_x32.x32
Build type: native build
Program GetZstdLibraryVersion.py found: YES (/usr/bin/python3.12 /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson/GetZstdLibraryVersion.py)
Project name: zstd
Project version: 1.5.5
C compiler for the host machine: x86_64-pc-linux-gnu-gcc -mx32 (gcc 13.2.1 "x86_64-pc-linux-gnu-gcc (Gentoo 13.2.1_p20240113-r1 p12) 13.2.1 20240113")
C linker for the host machine: x86_64-pc-linux-gnu-gcc -mx32 ld.bfd 2.41
C++ compiler for the host machine: x86_64-pc-linux-gnu-g++ -mx32 (gcc 13.2.1 "x86_64-pc-linux-gnu-g++ (Gentoo 13.2.1_p20240113-r1 p12) 13.2.1 20240113")
C++ linker for the host machine: x86_64-pc-linux-gnu-g++ -mx32 ld.bfd 2.41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Library m found: YES
Run-time dependency threads found: YES
Dependency zlib skipped: feature zlib disabled
Dependency liblzma skipped: feature lzma disabled
Dependency liblz4 skipped: feature lz4 disabled
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C++ supports arguments -Wundef: YES
Compiler for C++ supports arguments -Wshadow: YES
Compiler for C++ supports arguments -Wcast-align: YES
Compiler for C++ supports arguments -Wcast-qual: YES
Message: Enable legacy support back to version 0.5
Message: Enable multi-threading support
Found pkg-config: YES (/usr/bin/x86_64-pc-linux-gnu-pkg-config) 2.1.0
Build targets in project: 2
zstd 1.5.5
User defined options
Native files : /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnux32.x32.ini
/x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnux32.x32.ini.local
build.pkg_config_path: /usr/share/pkgconfig:/usr/share/pkgconfig
buildtype : plain
default_library : shared
libdir : libx32
localstatedir : /var/lib
pkg_config_path : /usr/share/pkgconfig:/usr/share/pkgconfig
prefix : /usr
sysconfdir : /etc
werror : false
wrap_mode : nodownload
b_lto : false
b_pch : false
bin_contrib : false
bin_programs : false
bin_tests : false
lz4 : disabled
lzma : disabled
zlib : disabled
Found ninja-1.11.1 at /usr/bin/ninja
^[[32m*^[[0m 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 /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini -Db_pch=false -Dwerror=false -Db_lto=false --buildtype plain -Ddefault_library=shared -Dbin_programs=true -Dbin_contrib=true -Dbin_tests=false -Dzlib=enabled -Dlzma=enabled -Dlz4=disabled --native-file /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini.local /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_64.amd64
The Meson build system
Version: 1.3.1
Source dir: /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson
Build dir: /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson-abi_x86_64.amd64
Build type: native build
Program GetZstdLibraryVersion.py found: YES (/usr/bin/python3.12 /x/portage/app-arch/zstd-1.5.5-r1/work/zstd-1.5.5/build/meson/GetZstdLibraryVersion.py)
Project name: zstd
Project version: 1.5.5
C compiler for the host machine: x86_64-pc-linux-gnu-gcc (gcc 13.2.1 "x86_64-pc-linux-gnu-gcc (Gentoo 13.2.1_p20240113-r1 p12) 13.2.1 20240113")
C linker for the host machine: x86_64-pc-linux-gnu-gcc ld.bfd 2.41
C++ compiler for the host machine: x86_64-pc-linux-gnu-g++ (gcc 13.2.1 "x86_64-pc-linux-gnu-g++ (Gentoo 13.2.1_p20240113-r1 p12) 13.2.1 20240113")
C++ linker for the host machine: x86_64-pc-linux-gnu-g++ ld.bfd 2.41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Library m found: YES
Run-time dependency threads found: YES
Found pkg-config: YES (/usr/bin/x86_64-pc-linux-gnu-pkg-config) 2.1.0
Run-time dependency zlib found: YES 1.3.1
Run-time dependency liblzma found: YES 5.4.6
Dependency liblz4 skipped: feature lz4 disabled
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C++ supports arguments -Wundef: YES
Compiler for C++ supports arguments -Wshadow: YES
Compiler for C++ supports arguments -Wcast-align: YES
Compiler for C++ supports arguments -Wcast-qual: YES
Message: Enable legacy support back to version 0.5
Message: Enable multi-threading support
Has header "execinfo.h" skipped: feature backtrace disabled
Build targets in project: 7
zstd 1.5.5
User defined options
Native files : /x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini
/x/portage/app-arch/zstd-1.5.5-r1/temp/meson.x86_64-pc-linux-gnu.amd64.ini.local
build.pkg_config_path: /usr/share/pkgconfig
buildtype : plain
default_library : shared
libdir : lib64
localstatedir : /var/lib
pkg_config_path : /usr/share/pkgconfig
prefix : /usr
sysconfdir : /etc
werror : false
wrap_mode : nodownload
b_lto : false
b_pch : false
bin_contrib : true
bin_programs : true
bin_tests : false
lz4 : disabled
lzma : enabled
zlib : enabled
Found ninja-1.11.1 at /usr/bin/ninja
>>> Source configured.
next prev parent reply other threads:[~2024-02-20 6:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 4:26 [gentoo-dev] [PATCH 0/3] eclass updates for meson <> distutils <> LTO Eli Schwartz
2024-02-20 4:26 ` [gentoo-dev] [PATCH 1/3] meson.eclass: wire up LTO support directly into the meson options Eli Schwartz
2024-02-20 5:58 ` Mike Gilbert
2024-02-20 6:09 ` Eli Schwartz
2024-02-20 6:24 ` Mike Gilbert [this message]
2024-02-20 6:33 ` Eli Schwartz
2024-02-20 6:37 ` Eli Schwartz
2024-02-20 6:40 ` Sam James
2024-02-20 4:26 ` [gentoo-dev] [PATCH 2/3] distutils-r1.eclass: wire up meson-python to meson.eclass Eli Schwartz
2024-02-20 4:42 ` Sam James
2024-02-20 5:12 ` Eli Schwartz
2024-02-20 6:14 ` [gentoo-dev] [PATCH v2 0/5] eclass updates for meson <> distutils <> LTO Eli Schwartz
2024-02-20 6:14 ` [gentoo-dev] [PATCH v2 1/5] meson.eclass: wire up LTO support directly into the meson options Eli Schwartz
2024-02-20 6:14 ` [gentoo-dev] [PATCH v2 2/5] meson.eclass: prefer -D buildtype instead of --buildtype Eli Schwartz
2024-02-20 6:14 ` [gentoo-dev] [PATCH v2 3/5] meson.eclass: refactor src_configure into a setter function Eli Schwartz
2024-02-20 6:42 ` [gentoo-dev] " Eli Schwartz
2024-02-20 6:14 ` [gentoo-dev] [PATCH v2 4/5] distutils-r1.eclass: wire up meson-python to meson.eclass Eli Schwartz
2024-02-20 6:55 ` Michał Górny
2024-02-20 20:45 ` Eli Schwartz
2024-02-20 6:14 ` [gentoo-dev] [PATCH v2 5/5] distutils-r1.eclass: fix src_configure to handle flag-o-matic correctly Eli Schwartz
2024-02-20 6:28 ` [gentoo-dev] [PATCH 2/3] distutils-r1.eclass: wire up meson-python to meson.eclass Michał Górny
2024-02-20 4:26 ` [gentoo-dev] [PATCH 3/3] distutils-r1.eclass: fix src_configure to handle flag-o-matic correctly Eli Schwartz
2024-02-20 6:35 ` Michał Górny
2024-02-20 4:41 ` [gentoo-dev] [PATCH 0/3] eclass updates for meson <> distutils <> LTO Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ0EP42T9DTFw0jU3TyU=MoUg28H-LHz2s1BAHLvOYyCK_a3VA@mail.gmail.com' \
--to=floppym@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox