public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add {,sysdep-}ld-library-path make variable
@ 2020-11-13 19:42 Samuel Thibault
  2020-11-13 20:04 ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Thibault @ 2020-11-13 19:42 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

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/.
---
 Makeconfig                   | 3 +++
 dlfcn/Makefile               | 2 +-
 elf/Makefile                 | 4 ++--
 inet/Makefile                | 2 +-
 nptl/Makefile                | 2 +-
 sysdeps/mach/hurd/Makeconfig | 2 ++
 6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/Makeconfig b/Makeconfig
index dfda418aac..febdb3cece 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)$(sysdep-ld-library-path)
 
 ifndef LD
 LD := ld -X
diff --git a/dlfcn/Makefile b/dlfcn/Makefile
index 4b7e0387b3..412e7c57d5 100644
--- a/dlfcn/Makefile
+++ b/dlfcn/Makefile
@@ -52,7 +52,7 @@ ifeq (yes,$(build-shared))
 tests += tststatic tststatic2 tststatic3 tststatic4 tststatic5
 tests-static += tststatic tststatic2 tststatic3 tststatic4 tststatic5
 modules-names += modstatic modstatic2 modstatic3 modstatic5
-tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+tststatic-ENV = LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf
 tststatic2-ENV = $(tststatic-ENV)
 tststatic3-ENV = $(tststatic-ENV)
 tststatic4-ENV = $(tststatic-ENV)
diff --git a/elf/Makefile b/elf/Makefile
index f10cc59e7c..042fb569e3 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -178,7 +178,7 @@ tests-static := $(tests-static-normal) $(tests-static-internal)
 ifeq (yes,$(build-shared))
 tests-static += tst-tls9-static tst-single_threaded-static-dlopen
 static-dlopen-environment = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
 tst-tls9-static-ENV = $(static-dlopen-environment)
 tst-single_threaded-static-dlopen-ENV = $(static-dlopen-environment)
 
@@ -1669,7 +1669,7 @@ $(objpfx)tst-libc_dlvsym-dso.so: $(libsupport) $(libdl)
 $(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
 $(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a
 tst-libc_dlvsym-static-ENV = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
 $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
 
 $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
diff --git a/inet/Makefile b/inet/Makefile
index 7a807fe805..a32c433dc3 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -123,5 +123,5 @@ endif
 # The test uses dlopen indirectly and would otherwise load system
 # objects.
 tst-idna_name_classify-ENV = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
 $(objpfx)tst-idna_name_classify.out: $(gen-locales)
diff --git a/nptl/Makefile b/nptl/Makefile
index f4134916b2..74ab758c12 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -614,7 +614,7 @@ tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so
 # The test uses dlopen indirectly and would otherwise load system
 # objects.
 tst-setuid1-static-ENV = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf:$(common-objpfx)nss
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf:$(common-objpfx)nss
 
 # The tests here better do not run in parallel.
 ifeq ($(run-built-tests),yes)
diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig
index fe3b7c553e..959f23ec12 100644
--- a/sysdeps/mach/hurd/Makeconfig
+++ b/sysdeps/mach/hurd/Makeconfig
@@ -5,3 +5,5 @@ static-start-installed-name = crt0.o
 
 # GNU libc on the Hurd is always reentrant.
 libc-reentrant = yes
+
+sysdep-ld-library-path = :$(common-objpfx)/mach:$(common-objpfx)/hurd
-- 
2.28.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add {,sysdep-}ld-library-path make variable
  2020-11-13 19:42 [PATCH] Add {,sysdep-}ld-library-path make variable Samuel Thibault
@ 2020-11-13 20:04 ` Andreas Schwab
  2020-11-14  9:02   ` Samuel Thibault
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2020-11-13 20:04 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, commit-hurd

On Nov 13 2020, Samuel Thibault wrote:

> diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig
> index fe3b7c553e..959f23ec12 100644
> --- a/sysdeps/mach/hurd/Makeconfig
> +++ b/sysdeps/mach/hurd/Makeconfig
> @@ -5,3 +5,5 @@ static-start-installed-name = crt0.o
>  
>  # GNU libc on the Hurd is always reentrant.
>  libc-reentrant = yes
> +
> +sysdep-ld-library-path = :$(common-objpfx)/mach:$(common-objpfx)/hurd

I don't think sysdep-ld-library-path should include the leading
separator.  Instead, ld-library-path can use
$(addprefix :,$(sysdep-ld-library-path)).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add {,sysdep-}ld-library-path make variable
  2020-11-13 20:04 ` Andreas Schwab
@ 2020-11-14  9:02   ` Samuel Thibault
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Thibault @ 2020-11-14  9:02 UTC (permalink / raw)
  To: Andreas Schwab

Andreas Schwab, le ven. 13 nov. 2020 21:04:03 +0100, a ecrit:
> On Nov 13 2020, Samuel Thibault wrote:
> > diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig
> > index fe3b7c553e..959f23ec12 100644
> > --- a/sysdeps/mach/hurd/Makeconfig
> > +++ b/sysdeps/mach/hurd/Makeconfig
> > @@ -5,3 +5,5 @@ static-start-installed-name = crt0.o
> >  
> >  # GNU libc on the Hurd is always reentrant.
> >  libc-reentrant = yes
> > +
> > +sysdep-ld-library-path = :$(common-objpfx)/mach:$(common-objpfx)/hurd
> 
> I don't think sysdep-ld-library-path should include the leading
> separator.  Instead, ld-library-path can use
> $(addprefix :,$(sysdep-ld-library-path)).

Right :) fixed so.

Samuel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add {,sysdep-}ld-library-path make variable
  2020-11-13 20:25 Samuel Thibault
@ 2020-11-13 20:25 ` Samuel Thibault
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Thibault @ 2020-11-13 20:25 UTC (permalink / raw)
  To: libc-alpha; +Cc: commit-hurd

There, this one is actually fixed, sorry for the confusion.

Samuel

Samuel Thibault, le ven. 13 nov. 2020 21:25:17 +0100, a ecrit:
> 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/.
> ---
>  Makeconfig                   | 3 +++
>  dlfcn/Makefile               | 2 +-
>  elf/Makefile                 | 4 ++--
>  inet/Makefile                | 2 +-
>  nptl/Makefile                | 2 +-
>  sysdeps/mach/hurd/Makeconfig | 2 ++
>  6 files changed, 10 insertions(+), 5 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
> diff --git a/dlfcn/Makefile b/dlfcn/Makefile
> index 4b7e0387b3..412e7c57d5 100644
> --- a/dlfcn/Makefile
> +++ b/dlfcn/Makefile
> @@ -52,7 +52,7 @@ ifeq (yes,$(build-shared))
>  tests += tststatic tststatic2 tststatic3 tststatic4 tststatic5
>  tests-static += tststatic tststatic2 tststatic3 tststatic4 tststatic5
>  modules-names += modstatic modstatic2 modstatic3 modstatic5
> -tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
> +tststatic-ENV = LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf
>  tststatic2-ENV = $(tststatic-ENV)
>  tststatic3-ENV = $(tststatic-ENV)
>  tststatic4-ENV = $(tststatic-ENV)
> diff --git a/elf/Makefile b/elf/Makefile
> index f10cc59e7c..042fb569e3 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -178,7 +178,7 @@ tests-static := $(tests-static-normal) $(tests-static-internal)
>  ifeq (yes,$(build-shared))
>  tests-static += tst-tls9-static tst-single_threaded-static-dlopen
>  static-dlopen-environment = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
>  tst-tls9-static-ENV = $(static-dlopen-environment)
>  tst-single_threaded-static-dlopen-ENV = $(static-dlopen-environment)
>  
> @@ -1669,7 +1669,7 @@ $(objpfx)tst-libc_dlvsym-dso.so: $(libsupport) $(libdl)
>  $(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
>  $(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a
>  tst-libc_dlvsym-static-ENV = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
>  $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
>  
>  $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
> diff --git a/inet/Makefile b/inet/Makefile
> index 7a807fe805..a32c433dc3 100644
> --- a/inet/Makefile
> +++ b/inet/Makefile
> @@ -123,5 +123,5 @@ endif
>  # The test uses dlopen indirectly and would otherwise load system
>  # objects.
>  tst-idna_name_classify-ENV = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
>  $(objpfx)tst-idna_name_classify.out: $(gen-locales)
> diff --git a/nptl/Makefile b/nptl/Makefile
> index f4134916b2..74ab758c12 100644
> --- a/nptl/Makefile
> +++ b/nptl/Makefile
> @@ -614,7 +614,7 @@ tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so
>  # The test uses dlopen indirectly and would otherwise load system
>  # objects.
>  tst-setuid1-static-ENV = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf:$(common-objpfx)nss
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf:$(common-objpfx)nss
>  
>  # The tests here better do not run in parallel.
>  ifeq ($(run-built-tests),yes)
> diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig
> index fe3b7c553e..9adf8f291d 100644
> --- a/sysdeps/mach/hurd/Makeconfig
> +++ b/sysdeps/mach/hurd/Makeconfig
> @@ -5,3 +5,5 @@ static-start-installed-name = crt0.o
>  
>  # GNU libc on the Hurd is always reentrant.
>  libc-reentrant = yes
> +
> +sysdep-ld-library-path = $(common-objpfx)/mach:$(common-objpfx)/hurd
> -- 
> 2.28.0
> 

-- 
Samuel
Linux, c'est simple : ça s'adresse à une machine qui est parfois un peu
maraboutée mais qui d'habitude n'a pas d'états d'âme. Sur Usenet y'a
plein d'humains et de primates, et ça devient vraiment gore par moment.
-+- TP in : Guide du linuxien pervers - "Le linuxien a-t-il une âme ?" -+-

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Add {,sysdep-}ld-library-path make variable
@ 2020-11-13 20:25 Samuel Thibault
  2020-11-13 20:25 ` Samuel Thibault
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Thibault @ 2020-11-13 20:25 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

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/.
---
 Makeconfig                   | 3 +++
 dlfcn/Makefile               | 2 +-
 elf/Makefile                 | 4 ++--
 inet/Makefile                | 2 +-
 nptl/Makefile                | 2 +-
 sysdeps/mach/hurd/Makeconfig | 2 ++
 6 files changed, 10 insertions(+), 5 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
diff --git a/dlfcn/Makefile b/dlfcn/Makefile
index 4b7e0387b3..412e7c57d5 100644
--- a/dlfcn/Makefile
+++ b/dlfcn/Makefile
@@ -52,7 +52,7 @@ ifeq (yes,$(build-shared))
 tests += tststatic tststatic2 tststatic3 tststatic4 tststatic5
 tests-static += tststatic tststatic2 tststatic3 tststatic4 tststatic5
 modules-names += modstatic modstatic2 modstatic3 modstatic5
-tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+tststatic-ENV = LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf
 tststatic2-ENV = $(tststatic-ENV)
 tststatic3-ENV = $(tststatic-ENV)
 tststatic4-ENV = $(tststatic-ENV)
diff --git a/elf/Makefile b/elf/Makefile
index f10cc59e7c..042fb569e3 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -178,7 +178,7 @@ tests-static := $(tests-static-normal) $(tests-static-internal)
 ifeq (yes,$(build-shared))
 tests-static += tst-tls9-static tst-single_threaded-static-dlopen
 static-dlopen-environment = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
 tst-tls9-static-ENV = $(static-dlopen-environment)
 tst-single_threaded-static-dlopen-ENV = $(static-dlopen-environment)
 
@@ -1669,7 +1669,7 @@ $(objpfx)tst-libc_dlvsym-dso.so: $(libsupport) $(libdl)
 $(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
 $(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a
 tst-libc_dlvsym-static-ENV = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
 $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
 
 $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
diff --git a/inet/Makefile b/inet/Makefile
index 7a807fe805..a32c433dc3 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -123,5 +123,5 @@ endif
 # The test uses dlopen indirectly and would otherwise load system
 # objects.
 tst-idna_name_classify-ENV = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
 $(objpfx)tst-idna_name_classify.out: $(gen-locales)
diff --git a/nptl/Makefile b/nptl/Makefile
index f4134916b2..74ab758c12 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -614,7 +614,7 @@ tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so
 # The test uses dlopen indirectly and would otherwise load system
 # objects.
 tst-setuid1-static-ENV = \
-  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf:$(common-objpfx)nss
+  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf:$(common-objpfx)nss
 
 # The tests here better do not run in parallel.
 ifeq ($(run-built-tests),yes)
diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig
index fe3b7c553e..9adf8f291d 100644
--- a/sysdeps/mach/hurd/Makeconfig
+++ b/sysdeps/mach/hurd/Makeconfig
@@ -5,3 +5,5 @@ static-start-installed-name = crt0.o
 
 # GNU libc on the Hurd is always reentrant.
 libc-reentrant = yes
+
+sysdep-ld-library-path = $(common-objpfx)/mach:$(common-objpfx)/hurd
-- 
2.28.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Add {,sysdep-}ld-library-path make variable
  2020-11-13 20:14 [hurd,commited] " Samuel Thibault
@ 2020-11-13 20:15 ` Samuel Thibault
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Thibault @ 2020-11-13 20:15 UTC (permalink / raw)
  To: libc-alpha; +Cc: commit-hurd

Oops, sorry, wrong script, it's not commited, this is still an RFC

Samuel

Samuel Thibault, le ven. 13 nov. 2020 21:14:58 +0100, a ecrit:
> 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/.
> ---
>  Makeconfig                   | 3 +++
>  dlfcn/Makefile               | 2 +-
>  elf/Makefile                 | 4 ++--
>  inet/Makefile                | 2 +-
>  nptl/Makefile                | 2 +-
>  sysdeps/mach/hurd/Makeconfig | 2 ++
>  6 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/Makeconfig b/Makeconfig
> index dfda418aac..151978ba71 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
> diff --git a/dlfcn/Makefile b/dlfcn/Makefile
> index 4b7e0387b3..412e7c57d5 100644
> --- a/dlfcn/Makefile
> +++ b/dlfcn/Makefile
> @@ -52,7 +52,7 @@ ifeq (yes,$(build-shared))
>  tests += tststatic tststatic2 tststatic3 tststatic4 tststatic5
>  tests-static += tststatic tststatic2 tststatic3 tststatic4 tststatic5
>  modules-names += modstatic modstatic2 modstatic3 modstatic5
> -tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
> +tststatic-ENV = LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf
>  tststatic2-ENV = $(tststatic-ENV)
>  tststatic3-ENV = $(tststatic-ENV)
>  tststatic4-ENV = $(tststatic-ENV)
> diff --git a/elf/Makefile b/elf/Makefile
> index f10cc59e7c..042fb569e3 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -178,7 +178,7 @@ tests-static := $(tests-static-normal) $(tests-static-internal)
>  ifeq (yes,$(build-shared))
>  tests-static += tst-tls9-static tst-single_threaded-static-dlopen
>  static-dlopen-environment = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
>  tst-tls9-static-ENV = $(static-dlopen-environment)
>  tst-single_threaded-static-dlopen-ENV = $(static-dlopen-environment)
>  
> @@ -1669,7 +1669,7 @@ $(objpfx)tst-libc_dlvsym-dso.so: $(libsupport) $(libdl)
>  $(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
>  $(objpfx)tst-libc_dlvsym-static: $(common-objpfx)dlfcn/libdl.a
>  tst-libc_dlvsym-static-ENV = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
>  $(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
>  
>  $(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
> diff --git a/inet/Makefile b/inet/Makefile
> index 7a807fe805..a32c433dc3 100644
> --- a/inet/Makefile
> +++ b/inet/Makefile
> @@ -123,5 +123,5 @@ endif
>  # The test uses dlopen indirectly and would otherwise load system
>  # objects.
>  tst-idna_name_classify-ENV = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
>  $(objpfx)tst-idna_name_classify.out: $(gen-locales)
> diff --git a/nptl/Makefile b/nptl/Makefile
> index f4134916b2..74ab758c12 100644
> --- a/nptl/Makefile
> +++ b/nptl/Makefile
> @@ -614,7 +614,7 @@ tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so
>  # The test uses dlopen indirectly and would otherwise load system
>  # objects.
>  tst-setuid1-static-ENV = \
> -  LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf:$(common-objpfx)nss
> +  LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf:$(common-objpfx)nss
>  
>  # The tests here better do not run in parallel.
>  ifeq ($(run-built-tests),yes)
> diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig
> index fe3b7c553e..9adf8f291d 100644
> --- a/sysdeps/mach/hurd/Makeconfig
> +++ b/sysdeps/mach/hurd/Makeconfig
> @@ -5,3 +5,5 @@ static-start-installed-name = crt0.o
>  
>  # GNU libc on the Hurd is always reentrant.
>  libc-reentrant = yes
> +
> +sysdep-ld-library-path = $(common-objpfx)/mach:$(common-objpfx)/hurd
> -- 
> 2.28.0
> 

-- 
Samuel
"How should I know if it works?  That's what beta testers are for.  I only
coded it."
(Attributed to Linus Torvalds, somewhere in a posting)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-14  9:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 19:42 [PATCH] Add {,sysdep-}ld-library-path make variable Samuel Thibault
2020-11-13 20:04 ` Andreas Schwab
2020-11-14  9:02   ` Samuel Thibault
2020-11-13 20:14 [hurd,commited] " Samuel Thibault
2020-11-13 20:15 ` [PATCH] " Samuel Thibault
2020-11-13 20:25 Samuel Thibault
2020-11-13 20:25 ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).