]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Fix tst-origin make rules
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 17 Mar 2025 19:08:22 +0000 (19:08 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 17 Mar 2025 19:15:07 +0000 (16:15 -0300)
Add tests-special before include Rules and compile liborigin.os with
MODULE_NAME set to testsuite instead of libc.

elf/Makefile

index 2bce1ed4867248c2ec70e49ddc53bca23f17d7ec..5a50c7d50c40e970e1e717842485513e4aa16a4b 100644 (file)
@@ -763,6 +763,7 @@ modules-names += \
   libmarkermod5-3 \
   libmarkermod5-4 \
   libmarkermod5-5 \
+  liborigin-mod \
   libtracemod1-1 \
   libtracemod2-1 \
   libtracemod3-1 \
@@ -1194,6 +1195,7 @@ extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
 # filtmod1.so, tst-big-note-lib.so, tst-ro-dynamic-mod.so have special
 # rules.
 modules-names-nobuild += \
+  liborigin-mod \
   filtmod1 \
   tst-audit24bmod1 \
   tst-audit24bmod2 \
@@ -1421,6 +1423,10 @@ $(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
 CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
 endif
 
+ifeq ($(run-built-tests),yes)
+tests-special += $(objpfx)tst-origin.out
+endif
+
 include ../Rules
 
 ifeq (yes,$(build-shared))
@@ -3443,10 +3449,8 @@ $(objpfx)tst-dlopen-constructor-null: \
 $(objpfx)tst-dlopen-constructor-null-mod2.so: \
   $(objpfx)tst-dlopen-constructor-null-mod1.so
 
-ifeq ($(run-built-tests),yes)
-tests-special += $(objpfx)tst-origin.out
-endif
 CFLAGS-tst-origin.c += $(no-stack-protector)
+CFLAGS-liborigin-mod.c += $(no-stack-protector)
 $(objpfx)tst-origin: $(objpfx)tst-origin.o $(objpfx)liborigin-mod.so
        $(LINK.o) -o $@ -B$(csu-objpfx) $(LDFLAGS.so) $< \
                -Wl,-rpath,\$$ORIGIN \