aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-18 07:24:38 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-22 13:15:43 +0800
commit03feea74dc75397f7eff10a92a322d235a6c1751 (patch)
treebe382100801776188c66b19ddaa4b43b1e7d93c7 /sysdeps
parentd085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4 (diff)
downloadglibc-03feea74dc75397f7eff10a92a322d235a6c1751.zip
glibc-03feea74dc75397f7eff10a92a322d235a6c1751.tar.gz
glibc-03feea74dc75397f7eff10a92a322d235a6c1751.tar.bz2
elf: Compile test modules with -fsemantic-interposition
Compiler may default to -fno-semantic-interposition. But some elf test modules must be compiled with -fsemantic-interposition to function properly. Add a TEST_CC check for -fsemantic-interposition and use it on elf test modules. This fixed FAIL: elf/tst-dlclose-lazy FAIL: elf/tst-pie1 FAIL: elf/tst-plt-rewrite1 FAIL: elf/unload4 when Clang 19 is used to test glibc. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/x86_64/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 9e19cf7..9d31685 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -196,6 +196,9 @@ modules-names += \
tst-plt-rewrite1-no-pie = yes
LDFLAGS-tst-plt-rewrite1 = -Wl,-z,now
+ifeq ($(have-test-cc-cflags-fsemantic-interposition),yes)
+CFLAGS-tst-plt-rewritemod1.c += -fsemantic-interposition
+endif
LDFLAGS-tst-plt-rewritemod1.so = -Wl,-z,now
tst-plt-rewrite1-ENV = GLIBC_TUNABLES=glibc.cpu.plt_rewrite=1 LD_DEBUG=files:bindings
$(objpfx)tst-plt-rewrite1: $(objpfx)tst-plt-rewritemod1.so