]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: require libc sym for -shared
authorAlexandre Oliva <oliva@adacore.com>
Mon, 29 Jan 2024 18:08:35 +0000 (15:08 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Mon, 29 Jan 2024 18:19:28 +0000 (15:19 -0300)
commit4bdcc8b3bf239c48140647c19d3addebc5d4b930
treedbff2bc922ce9f30ca5701fc5711ecb71f30d670
parent2ddce884b0d4895758d988498739d6cc2d4e1ffd
testsuite: require libc sym for -shared

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.

for  gcc/testsuite/ChangeLog

* lib/target-supports.exp (check_effective_target_shared):
Check for a static-only libc.
gcc/testsuite/lib/target-supports.exp