This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Support cross-testing for elf/tst-array*
On Tue, 30 Oct 2012, Roland McGrath wrote:
> Why aren't those using run-program-prefix?
Typically I'd assume that elf/ tests with special rules depend on
details of the environment for and options passed to the dynamic
linker, so that the generic variables for running programs on the host
are unsuitable. But I don't see any such dependency here; this patch
uses what I think are the simplest rules for these tests, with
$(built-program-cmd) (and the comparison inputs listed as first
dependencies so that the name of the test program appears as the
second dependency, as required for $(built-program-cmd) to work).
Tested x86_64 and with cross to powerpc.
2012-10-30 Joseph Myers <joseph@codesourcery.com>
* elf/Makefile ($(objpfx)tst-array1.out): Depend on comparison
input. Use $(build-program-cmd).
($(objpfx)tst-array1-static.out): Likewise.
($(objpfx)tst-array2.out): Likewise.
($(objpfx)tst-array3.out): Likewise.
($(objpfx)tst-array4.out): Likewise.
($(objpfx)tst-array5.out): Likewise.
($(objpfx)tst-array5-static.out): Likewise.
diff --git a/elf/Makefile b/elf/Makefile
index d583b94..42b792b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -846,45 +846,37 @@ LDFLAGS-tst-execstack-needed = -Wl,-z,noexecstack
LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
endif
-$(objpfx)tst-array1.out: $(objpfx)tst-array1
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array1 > $@
+$(objpfx)tst-array1.out: tst-array1.exp $(objpfx)tst-array1
+ $(built-program-cmd) > $@
cmp $@ tst-array1.exp > /dev/null
-$(objpfx)tst-array1-static.out: $(objpfx)tst-array1-static
- $(objpfx)tst-array1-static > $@
+$(objpfx)tst-array1-static.out: tst-array1.exp $(objpfx)tst-array1-static
+ $(built-program-cmd) > $@
cmp $@ tst-array1.exp > /dev/null
$(objpfx)tst-array2: $(objpfx)tst-array2dep.so
-$(objpfx)tst-array2.out: $(objpfx)tst-array2
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array2 > $@
+$(objpfx)tst-array2.out: tst-array2.exp $(objpfx)tst-array2
+ $(built-program-cmd) > $@
cmp $@ tst-array2.exp > /dev/null
-$(objpfx)tst-array3.out: $(objpfx)tst-array3
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array3 > $@
+$(objpfx)tst-array3.out: tst-array1.exp $(objpfx)tst-array3
+ $(built-program-cmd) > $@
cmp $@ tst-array1.exp > /dev/null
$(objpfx)tst-array4: $(libdl)
-$(objpfx)tst-array4.out: $(objpfx)tst-array4 $(objpfx)tst-array2dep.so
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $< > $@
+$(objpfx)tst-array4.out: tst-array4.exp $(objpfx)tst-array4 \
+ $(objpfx)tst-array2dep.so
+ $(built-program-cmd) > $@
cmp $@ tst-array4.exp > /dev/null
$(objpfx)tst-array5: $(objpfx)tst-array5dep.so
-$(objpfx)tst-array5.out: $(objpfx)tst-array5
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array5 > $@
+$(objpfx)tst-array5.out: tst-array5.exp $(objpfx)tst-array5
+ $(built-program-cmd) > $@
cmp $@ tst-array5.exp > /dev/null
-$(objpfx)tst-array5-static.out: $(objpfx)tst-array5-static
- $(objpfx)tst-array5-static > $@
+$(objpfx)tst-array5-static.out: tst-array5-static.exp \
+ $(objpfx)tst-array5-static
+ $(built-program-cmd) > $@
cmp $@ tst-array5-static.exp > /dev/null
CFLAGS-tst-pie1.c += $(pie-ccflag)
--
Joseph S. Myers
joseph@codesourcery.com