diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-18 07:24:38 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-22 13:15:43 +0800 |
commit | 03feea74dc75397f7eff10a92a322d235a6c1751 (patch) | |
tree | be382100801776188c66b19ddaa4b43b1e7d93c7 /elf | |
parent | d085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4 (diff) | |
download | glibc-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 'elf')
-rw-r--r-- | elf/Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile index b62836d..3c17688 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -3293,3 +3293,23 @@ tst-tls22-mod1.so-no-z-defs = yes tst-tls22-mod1-gnu2.so-no-z-defs = yes tst-tls22-mod2.so-no-z-defs = yes tst-tls22-mod2-gnu2.so-no-z-defs = yes + +ifeq ($(have-test-cc-cflags-fsemantic-interposition),yes) +# Compiler may default to -fno-semantic-interposition. These modules +# must be compiled with -fsemantic-interposition. +modules-semantic-interposition = \ + tst-dlclose-lazy-mod1 \ + tst-dlclose-lazy-mod2 \ + tst-piemod1 \ + unload4mod1 \ + unload4mod2 \ + unload4mod3 \ + unload4mod4 \ +# modules-semantic-interposition + +define enable-semantic-interposition +CFLAGS-$(1).c += -fsemantic-interposition +endef +$(foreach m,$(modules-semantic-interposition),\ + $(eval $(call enable-semantic-interposition,$(m)))) +endif |