Skip to content

Commit

Permalink
Don't use run-via-rtld-prefix for anything other than tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
siddhesh committed Apr 11, 2013
1 parent 8da491f commit 01dc6df
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
2013-04-11 Siddhesh Poyarekar <siddhesh@redhat.com>

* Makeconfig (rtld-prefix): Define built linker prefix.
* Rules (run-bench): Use it.
* math/Makefile (run-regen-ulps): Likewise.

* Rules (bench): Remove eval.

2013-04-10 Siddhesh Poyarekar <siddhesh@redhat.com>
Expand Down
7 changes: 4 additions & 3 deletions Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Rules
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ binaries-bench := $(addprefix $(objpfx)bench-,$(bench))

run-bench = $(test-wrapper-env) \
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
$($*-ENV) $(run-via-rtld-prefix) $${run}
$($*-ENV) $(rtld-prefix) $${run}

bench: $(binaries-bench)
for run in $^; do \
Expand Down
2 changes: 1 addition & 1 deletion math/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ ifneq (no,$(PERL))

run-regen-ulps = $(test-wrapper-env) \
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
$($*-ENV) $(run-via-rtld-prefix) $${run}
$($*-ENV) $(rtld-prefix) $${run}

regen-ulps: $(addprefix $(objpfx),$(libm-tests))
rm -f $(objpfx)ULPs; rm -f $(objpfx)NewUlps; \
Expand Down

0 comments on commit 01dc6df

Please sign in to comment.