aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-03-21 21:40:28 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-03-21 21:40:28 +0100
commit2f8e8c9cb72c0f479bd4f9249ef681fe4f36d280 (patch)
tree652bd52f74ba3b852d8b1e8eee7341ea671ca735
parentc3410db9d0f941a6c464acabb8a63633ef614cbf (diff)
downloadglibc-2f8e8c9cb72c0f479bd4f9249ef681fe4f36d280.zip
glibc-2f8e8c9cb72c0f479bd4f9249ef681fe4f36d280.tar.gz
glibc-2f8e8c9cb72c0f479bd4f9249ef681fe4f36d280.tar.bz2
elf: Use +nolink-deps to add make-only dependency for tst-origin
The tst-origin test must link against liborigin-mod.so. Correct build order depends on a makefile rule dependency on $(objpfx)liborigin-mod.so. Use +nolink-deps to remvoe this dependency from the linker command line. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--elf/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 5566d39..1282a5b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -3452,8 +3452,11 @@ $(objpfx)tst-dlopen-constructor-null-mod2.so: \
CFLAGS-tst-origin.c += $(no-stack-protector)
CFLAGS-liborigin-mod.c += $(no-stack-protector)
+# Link tst-origin with liborigin-mod.so, but without a full path.
LDFLAGS-tst-origin += -Wl,-rpath,\$$ORIGIN -L$(subst :, -L,$(rpath-link)) -lorigin-mod
-$(objpfx)tst-origin.out: tst-origin.sh $(objpfx)liborigin-mod.so $(objpfx)tst-origin
+$(objpfx)tst-origin: +nolink-deps += $(objpfx)liborigin-mod.so
+$(objpfx)tst-origin: $(objpfx)liborigin-mod.so
+$(objpfx)tst-origin.out: tst-origin.sh $(objpfx)tst-origin
$(SHELL) \
$< \
'$(common-objpfx)' \