summary refs log tree commit diff
path: root/linuxthreads/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/Makefile')
-rw-r--r--linuxthreads/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile
index b9edd40031..ff26e06eea 100644
--- a/linuxthreads/Makefile
+++ b/linuxthreads/Makefile
@@ -185,7 +185,9 @@ endif
 # Depend on libc.so so a DT_NEEDED is generated in the shared objects.
 # This ensures they will load libc.so for needed symbols if loaded by
 # a statically-linked program that hasn't already loaded it.
-$(objpfx)libpthread.so: $(libc-link.so) $(common-objpfx)libc_nonshared.a
+# Depend on ld.so too to get proper versions of ld.so symbols.
+$(objpfx)libpthread.so: $(libc-link.so) $(common-objpfx)libc_nonshared.a \
+			$(if $(filter yes,$(elf)), $(elfobjdir)/ld.so)
 
 # Make sure we link with the thread library.
 ifeq ($(build-shared),yes)