This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add and use $(local-built-program-cmd)


This patch, relative to a tree with
<http://sourceware.org/ml/libc-alpha/2012-10/msg00605.html> applied,
creates $(local-built-program-cmd) as a variant of
$(built-program-cmd) for running directly on glibc's host, rather than
on the build system on which "make" is run.  This is for use of tests
that involve something run on the host execing a copy of the test
program (e.g. the test execing itself with different options).

Tested x86_64.

2012-10-22  Jim Blandy  <jimb@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* Makeconfig (local-built-program-cmd): New variable.
	* elf/Makefile (tst-stackguard1-ARGS): Use
	$(local-built-program-cmd).
	* posix/Makefile (tst-exec-ARGS): Use $(local-built-program-cmd).
	(tst-spawn-ARGS): Likewise.
	* rt/Makefile (tst-mqueue7-ARGS): Use $(local-built-program-cmd).

nptl/ChangeLog:
2012-10-22  Jim Blandy  <jimb@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	* Makefile (tst-cancel7-ARGS): Use $(local-built-program-cmd).
	(tst-exec4-ARGS): Likewise.
	(tst-stackguard1-ARGS): Likewise.

diff --git a/Makeconfig b/Makeconfig
index 0a78b76..910065f 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -597,6 +597,11 @@ run-program-prefix = $(run-via-rtld-prefix)
 # second dependency of the makefile target in which
 # $(built-program-cmd) is used.
 built-program-cmd = $(run-via-rtld-prefix) $(built-program-file)
+# $(local-built-program-cmd) is a command that, executed on the host
+# for which the library is built, runs the newly built program that is
+# the second dependency of the makefile target in which
+# $(local-built-program-cmd) is used.
+local-built-program-cmd = $(run-via-rtld-prefix) $(built-program-file)
 
 ifndef LD
 LD := ld -X
diff --git a/elf/Makefile b/elf/Makefile
index dde9409..3b2637a 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1046,7 +1046,7 @@ order2mod2.so-no-z-defs = yes
 LDFLAGS-order2mod1.so = $(no-as-needed)
 LDFLAGS-order2mod2.so = $(no-as-needed)
 
-tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
+tst-stackguard1-ARGS = --command "$(local-built-program-cmd) --child"
 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
 
 $(objpfx)tst-leaks1: $(libdl)
diff --git a/nptl/Makefile b/nptl/Makefile
index bc563f8..e79451a 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -439,7 +439,7 @@ CFLAGS-tst-initializers1-c99.c = $(CFLAGS-tst-initializers1-<)
 CFLAGS-tst-initializers1-gnu89.c = $(CFLAGS-tst-initializers1-<)
 CFLAGS-tst-initializers1-gnu99.c = $(CFLAGS-tst-initializers1-<)
 
-tst-cancel7-ARGS = --command "$(built-program-cmd)"
+tst-cancel7-ARGS = --command "$(local-built-program-cmd)"
 tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
 tst-umask1-ARGS = $(objpfx)tst-umask1.temp
 
@@ -595,7 +595,7 @@ $(objpfx)tst-cancel-wrappers.out: tst-cancel-wrappers.sh
 endif
 endif
 
-tst-exec4-ARGS = $(built-program-cmd)
+tst-exec4-ARGS = $(local-built-program-cmd)
 
 $(objpfx)tst-execstack: $(libdl)
 $(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
@@ -603,7 +603,7 @@ LDFLAGS-tst-execstack = -Wl,-z,noexecstack
 
 $(objpfx)tst-fini1mod.so: $(shared-thread-library)
 
-tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
+tst-stackguard1-ARGS = --command "$(local-built-program-cmd) --child"
 tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
 
 # The tests here better do not run in parallel
diff --git a/posix/Makefile b/posix/Makefile
index 6e3d0bb..5cda197 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -170,8 +170,8 @@ CFLAGS-execlp.os = -fomit-frame-pointer
 tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
 		--none random --col --color --colour
 
-tst-exec-ARGS = -- $(built-program-cmd)
-tst-spawn-ARGS = -- $(built-program-cmd)
+tst-exec-ARGS = -- $(local-built-program-cmd)
+tst-spawn-ARGS = -- $(local-built-program-cmd)
 tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
 tst-chmod-ARGS = $(objdir)
 tst-vfork3-ARGS = --test-dir=$(objpfx)
diff --git a/rt/Makefile b/rt/Makefile
index 941c471..9b9f599 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -77,4 +77,4 @@ ifeq (yes,$(build-bounded))
 $(tests:%=$(objpfx)%-bp): $(objpfx)librt_b.a $(bounded-thread-library)
 endif
 
-tst-mqueue7-ARGS = -- $(built-program-cmd)
+tst-mqueue7-ARGS = -- $(local-built-program-cmd)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]