summaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makeconfig b/Makeconfig
index ba0c940fbb..41f5839afc 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -291,8 +291,12 @@ endif
endif
ifndef link-libc
ifeq (yes,$(build-shared))
+# We need the versioned name of libc.so in the deps of $(others) et al
+# so that the symlink to libc.so is created before anything tries to
+# run the linked programs.
link-libc = -Wl,-rpath-link=$(common-objdir) \
- $(common-objpfx)libc.so $(common-objpfx)libc.a $(gnulib)
+ $(common-objpfx)libc.so$(libc.so-version) \
+ $(common-objpfx)libc.a $(gnulib)
# Choose the default search path for the dynamic linker based on
# where we will install libraries.
ifneq ($(libdir),$(slibdir))