From 997f49fbadf892136c77115edd537c832fb8074d Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 17 Mar 2025 19:08:22 +0000 Subject: [PATCH] elf: Fix tst-origin make rules Add tests-special before include Rules and compile liborigin.os with MODULE_NAME set to testsuite instead of libc. --- elf/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/elf/Makefile b/elf/Makefile index 2bce1ed486..5a50c7d50c 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -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 \ -- 2.47.2