about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 87b47ab1b6..c2f3274877 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -133,3 +133,8 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libm.so$(libm.so-version)
 else
 $(addprefix $(objpfx),$(tests)): $(objpfx)libm.a
 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)libm.so: $(common-objpfx)libc.so