> On 6 Nov 2022, at 23:15, Fangrui Song wrote: > > On 2022-11-06, Sam James wrote: >> >> >>> On 6 Nov 2022, at 23:06, Fangrui Song via Libc-alpha wrote: >>> >>> On 2022-11-06, Sam James wrote: >>>> >>>> >>>>> On 6 Nov 2022, at 18:17, Fangrui Song via Libc-alpha wrote: >>>>> >>>>> lld does not dump a linker script with --verbose (it does not use a >>>>> linker script driven design and lots of linker processing is not >>>>> serializable as a linker script anyway). With the default >>>>> --with-default-link=no build, $@T is empty and makes `test -s $@T` fail. >>>>> >>>>> Just dump the linker script with -fuse-ld=bfd. lld since 15 >>>>> (https://reviews.llvm.org/D124656) supports custom RELRO sections in the >>>>> GNU ld dumped linker script. >>>>> --- >>>> >>>> What if bfd isn't installed? >>> >>> Then --with-default-link=yes has to be used:) >> >> Configure should check in that case. > > The patch isn't worse than the current state: if ld => lld, the build > will just fail due to `test -s $@T` (the linker script is empty). Sure, but could you add a quick configure check while you're here?