summary refs log tree commit diff
path: root/Makeconfig
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-04-11 09:37:50 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-04-11 09:37:50 +0530
commit01dc6df938832fe923ac394812553c0fc8a0f113 (patch)
treec7c90a08af5aa4330f18c3b2356fc5acf0aafbd0 /Makeconfig
parent8da491f585f6112630688d0632407f5460136ffe (diff)
downloadglibc-01dc6df938832fe923ac394812553c0fc8a0f113.tar.gz
glibc-01dc6df938832fe923ac394812553c0fc8a0f113.tar.xz
glibc-01dc6df938832fe923ac394812553c0fc8a0f113.zip
Don't use run-via-rtld-prefix for anything other than tests
run-via-rtld-prefix checks whether the program to be run is a static
test and skips if it is.  This is fine, except that it assumes that
the program to be run is the second $^, which is true only for tests.

This change creates an rtld-prefix, which is simply the dynamic linker
prefix with the necessary arguments and uses that in the non-test
targets.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makeconfig b/Makeconfig
index 70deb1e182..a3d3e70150 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -604,6 +604,9 @@ endif
 # How to run a program we just linked with our library.
 # The program binary is assumed to be $(word 2,$^).
 built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
+rtld-prefix = $(elf-objpfx)$(rtld-installed-name)			      \
+	      --library-path						      \
+	      $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))
 ifeq (yes,$(build-shared))
 comma = ,
 sysdep-library-path = \
@@ -617,9 +620,7 @@ $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
 # empty.
 run-via-rtld-prefix =							      \
   $(if $(strip $(filter $(notdir $(built-program-file)),		      \
-			$(tests-static) $(xtests-static))),,		      \
-       $(elf-objpfx)$(rtld-installed-name)				      \
-	 --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
+			$(tests-static) $(xtests-static))),, $(rtld-prefix))
 else
 run-via-rtld-prefix =
 endif