View previous topic :: View next topic |
Author |
Message |
Goverp Advocate


Joined: 07 Mar 2007 Posts: 2242
|
Posted: Thu Apr 10, 2025 1:20 pm Post subject: Can't compile sys-libs/glibc with gcc-lto |
|
|
As per subject, I can't compile syslibs-glibc-2.40-r8 using gcc set up for LTO. The ebuild bombs out during the configuration tests, complaining that the compiler is too old.
Looking at it, the test uses __GNUC__ variables that appear to be checking against 6.6, and of course my gcc is much newer: sys-devel/gcc-14.2.1_p20241221
Any thoughts on why it's screwing up?
Of course, I'm bypassing it by removing the LTO-ness. It compiled happily, _________________ Greybeard |
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2290
|
Posted: Thu Apr 10, 2025 2:15 pm Post subject: |
|
|
The ebuild tries to filter out LTO, as glibc doesn't support being built with it yet. It does that successfully for me and others.
It isn't for you -- can you show the build.log, emerge --info, and config.log to figure out why? |
|
Back to top |
|
 |
Goverp Advocate


Joined: 07 Mar 2007 Posts: 2242
|
Posted: Fri Apr 11, 2025 12:56 pm Post subject: |
|
|
Sam, I've put the requested files on wgetpaste.
https://paste.gentoo.zip/QDJcsvPg
Sorry, I gave it all three files as arguments; assumed I'd get three files on paste.gentoo.zip, but it ran them all together.
Hope that helps. If not, I'm not too bothered as I can just remove the packages.env file entry that tried to turn LTO on. _________________ Greybeard |
|
Back to top |
|
 |
sam_ Developer


Joined: 14 Aug 2020 Posts: 2290
|
Posted: Fri Apr 11, 2025 2:04 pm Post subject: |
|
|
Thanks!
Here's the problem:
Quote: |
configure:5741: checking if gcc -m32 -mfpmath=sse -mstackrealign -march=bdver4 -mtune=znver3 -mno-fma4 -mno-lwp -mno-tbm -mno-xop -O2 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fuse-ld=mold -Wl,--as-needed -fuse-ld=bfd is sufficient to build libc
configure:5762: clang-cpp -m32 -mfpmath=sse -mstackrealign -march=bdver4 -mtune=znver3 -mno-fma4 -mno-lwp -mno-tbm -mno-xop -O2 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing conftest.c
warning: unknown warning option '-Werror=lto-type-mismatch'; did you mean '-Werror=selector-type-mismatch'? [-Wunknown-warning-option]
conftest.c:20:2: error: insufficient compiler
20 | #error insufficient compiler
| ^
|
Note that it uses 'clang-cpp', and Clang doesn't know -Werror=lto-type-mismatch. You seem to have CPP set to clang-cpp but the other toolchain components used here are GCC. Could you try unsetting that? |
|
Back to top |
|
 |
Goverp Advocate


Joined: 07 Mar 2007 Posts: 2242
|
Posted: Sat Apr 12, 2025 10:40 am Post subject: |
|
|
sam_ wrote: | ...
Note that it uses 'clang-cpp', and Clang doesn't know -Werror=lto-type-mismatch. You seem to have CPP set to clang-cpp but the other toolchain components used here are GCC. Could you try unsetting that? |
Many thanks, I doubt I'd have spotted that in amongst all the noise. My bad, it's set in make.conf, and not reset in my gcc /etc/portage/env overrides. I'm amazed it hasn't broken more things! _________________ Greybeard |
|
Back to top |
|
 |
|