[PATCH] configure: Add --disable-libsupport option
Florian Weimer
fweimer@redhat.com
Tue Mar 25 20:07:39 GMT 2025
* Joseph Myers:
> On Tue, 25 Mar 2025, Florian Weimer wrote:
>
>> This option allows to build (but not test) glibc with a GCC that
>> was built with --enable-shared, but which does not have access
>> to its libgcc_s.so.1 DSO. In this scenario, the -lgcc_s test
>> added in commit 5dfbc3c43ecc1bcfc760a032c91bb002660051bc ("support:
>> Link links-dso-program-c with libgcc_s only if available") fails
>> and linking against -lgcc_s is skipped. However, the test program
>> still has a dependency on _Unwind_Resume, but for a GCC built
>> with --enable-shared, this symbol is not available with -lgcc.
>
> Does linking with -lgcc_eh work in the case where libgcc_s does not
> work?
It should. The 32-bit libgcc_eh.a is unconditionally available in the
64-bit buildroot:
$ rpm -qf /usr/lib/gcc/x86_64-redhat-linux/14/32/libgcc_eh.a
gcc-14.2.1-3.fc40.x86_64
But this is very specific to the build environment, which is why I don't
want to add another linking check for -lgcc_eh.
I think it's better to link -lgcc_s under -Wl,--no-as-needed if
available, and drop the _Unwind_Resume symbol reference from the test
program. If you prefer this type of approach, I can verify that it
works and send a patch along those lines.
Thanks,
Florian
More information about the Libc-alpha
mailing list