summary refs log tree commit diff
path: root/Makeconfig
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-13 19:37:41 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-16 21:15:20 +0000
commit3dbbd2ff92b1a0a2465461ee049e3e2813b73fa4 (patch)
treeeeb38010eb00265c4899cc127f90bbc3e52a89ac /Makeconfig
parent1daccf403b1bd86370eb94edca794dc106d02039 (diff)
downloadglibc-3dbbd2ff92b1a0a2465461ee049e3e2813b73fa4.tar.gz
glibc-3dbbd2ff92b1a0a2465461ee049e3e2813b73fa4.tar.xz
glibc-3dbbd2ff92b1a0a2465461ee049e3e2813b73fa4.zip
Add {,sysdep-}ld-library-path make variable
On GNU/Hurd we not only need $(common-objpfx) in LD_LIBRARY_PATH when loading
dynamic objects, but also $(common-objpfx)/mach and $(common-objpfx)/hurd. This
adds an ld-library-path variable to be used as LD_LIBRARY_PATH basis in
Makefiles, and a sysdep-ld-library-path variable for sysdeps to add some
more paths, here mach/ and hurd/.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makeconfig b/Makeconfig
index dfda418aac..8074613b85 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -769,6 +769,9 @@ built-program-cmd = $(built-program-cmd-before-env) $(run-program-env) \
 # the second dependency of the makefile target in which
 # $(host-built-program-cmd) is used.
 host-built-program-cmd = $(run-via-rtld-prefix) $(built-program-file)
+# $(ld-library-path) is the common content to be set in LD_LIBRARY_PATH
+# for running static binaries that may load dynamic objects.
+ld-library-path = $(objpfx):$(common-objpfx)$(addprefix :,$(sysdep-ld-library-path))
 
 ifndef LD
 LD := ld -X