On 1/23/24 00:15, Alexandre Oliva wrote:
Targets whose binutils support -shared, but that don't have a shared libc, and that can't add PDC (non-PIC) to shared libraries, may succeed at the effective target test for -shared, because it brings nothing from libc, but tests that rely on -shared and that use bits from libc, such as g++.dg/lto/pr108772, fail despite requiring the shared effective target. Extend the effective target test to bring malloc() from libc, that's likely to be present in libc and bring a substantial amount of code if no shared libc is available. Regstrapped on x86_64-linux-gnu, also tested on aarch64-elf with gcc-13, where the problem was observed. Ok to install? for gcc/testsuite/ChangeLog * lib/target-supports.exp (check_effective_target_shared): Check for a static-only libc.
OK jeff