As summarized, LLD compatibility is broken somewhere in the Gentoo patch series starting at 7. Glibc 2.35 introduced compatibility with LLD 13 and should be capable of building. When disabling the Gentoo patch series by unmasking and using the vanilla USE flag, glibc-2.35-r5 and later are capable of being built. Reproducible: Always Steps to Reproduce: 1. LDFLAGS="-fuse-ld=lld" 2. Try to compile glibc-2.35-r5 or later 3. Failure 1. Unmask and enable USE="vanilla" 2. LDFLAGS="-fuse-ld=lld" 3. Try to compile glibc-2.35-r5 and later 4. Success Actual Results: With Gentoo patch version 7, results in failure. Expected Results: Expected results are for glibc-2.35 to build with LLD, which is the behavior witnessed with USE="vanilla" I'm not sure what insights I can provide. The glibc ebuild system is way above my head. I've gone into glibc-2.35-r4's working directory and the patch list is identical to glibc-2.35-r5's patch list. To be sure I've ran an ebuild clean configure on both and output to different text files, ran a diff and the only things different are the versions, not the names or lists of patches.
Created attachment 785189 [details] glibc-2.35-r4 patch list Including output of glibc-2.35-r4 patch list to show it's identical to glibc-2.35-r5
Created attachment 785192 [details] glibc-2.35-r5 patch list Including output of glibc-2.35-r5 patch list to show it's identical to glibc-2.35-r4
Created attachment 785195 [details] glibc-2.35-r7[vanilla] successful build log glibc-2.35-r7[vanilla] successful build log
Created attachment 785198 [details] glibc-2.35-r7[-vanilla] failure build log Gentoo patched glibc-2.35-r7[-vanilla] failure build log
Created attachment 785201 [details] glibc-2.35-r4[-vanilla] successful build log Gentoo patched glibc-2.35-r4[-vanilla] successful build log, prior to the start of failures with PATCHVER=7
Created attachment 785204 [details] glibc-2.35-r7[-vanilla] successful build log with -fuse-ld=bfd Gentoo patched glibc-2.35-r7[-vanilla] successful build log with -fuse-ld=bfd, to show the breakage is when using -fuse-ld=lld and not something else.
Don't do that. I'll try to find out if it was ever supposed to work, but in general glibc is (still) tightly coupled to gcc and gnu binutils.
As of glibc 2.35 and LLD 13, glibc is supposed to be capable of linking with LLD. MaskRay, a LLD developer, worked with the glibc folks on this. https://maskray.me/blog/2021-09-05-build-glibc-with-lld He's also working with them to get Clang support as well, decoupling glibc from GCC & binutils. FYI, from 2.35 to 2.35-r4, I was able to use a LLD linked glibc. It wasn't until 2.35-r5 that something on the Gentoo side of things broke it.
(In reply to unhappy-ending from comment #8) > As of glibc 2.35 and LLD 13, glibc is supposed to be capable of linking with > LLD. MaskRay, a LLD developer, worked with the glibc folks on this. > > https://maskray.me/blog/2021-09-05-build-glibc-with-lld > > He's also working with them to get Clang support as well, decoupling glibc > from GCC & binutils. > > FYI, from 2.35 to 2.35-r4, I was able to use a LLD linked glibc. It wasn't > until 2.35-r5 that something on the Gentoo side of things broke it. We know, but clearly something broke, and it's not the garden path yet. In any case, shouldn't block stabiilisation, I think was the point of dilf's comment. Doesn't mean it's invalid.
Is 2.36 OK ?
(In reply to Andreas K. Hüttel from comment #10) > Is 2.36 OK ? Yes, worse actually. Trying to build with LLD fails regardless of USE="vanilla" being set.
(In reply to unhappy-ending from comment #11) > (In reply to Andreas K. Hüttel from comment #10) > > Is 2.36 OK ? > > Yes, worse actually. Trying to build with LLD fails regardless of > USE="vanilla" being set. I meant no, not yes, lol!