]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Define and use $(run-built-tests).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 24 Oct 2012 00:08:46 +0000 (00:08 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 24 Oct 2012 00:08:46 +0000 (00:08 +0000)
22 files changed:
ChangeLog
Makeconfig
Rules
catgets/Makefile
elf/Makefile
grp/Makefile
iconv/Makefile
iconvdata/Makefile
intl/Makefile
io/Makefile
libio/Makefile
localedata/ChangeLog
localedata/Makefile
malloc/Makefile
misc/Makefile
nptl/ChangeLog
nptl/Makefile
posix/Makefile
resolv/Makefile
stdio-common/Makefile
stdlib/Makefile
string/Makefile

index bc06586903a834b06b587011791795e5d8a618db..1484c2f250a187fda6bc37ad4d903c4b797ce341 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
 
+       * Makeconfig (run-built-tests): New variable.
+       * Rules [$(cross-compiling) = yes]: Change condition to
+       [$(run-built-tests) = no].
+       * catgets/Makefile [$(cross-compiling) != yes]: Change condition
+       to [$(run-built-tests) = yes].
+       * elf/Makefile [$(cross-compiling) = no]: Likewise
+       * grp/Makefile [$(cross-compiling) = no]: Likewise.
+       * iconv/Makefile [$(cross-compiling) != yes]: Likewise.
+       * iconvdata/Makefile [$(cross-compiling) = no]: Likewise.
+       * intl/Makefile [$(cross-compiling) = no]: Likewise.
+       * io/Makefile [$(cross-compiling) = no]: Likewise.
+       * libio/Makefile [$(cross-compiling) = no]: Likewise.
+       * malloc/Makefile [$(cross-compiling) = no]: Likewise.
+       * misc/Makefile [$(cross-compiling) = no]: Likewise.
+       * posix/Makefile [$(cross-compiling) = no]: Likewise.
+       * resolv/Makefile [$(cross-compiling) = no]: Likewise.
+       * stdio-common/Makefile [$(cross-compiling) = no]: Likewise.
+       * stdlib/Makefile [$(cross-compiling) = no]: Likewise.
+       * string/Makefile [$(cross-compiling) = no]: Likewise.
+
        * posix/Makefile ($(objpfx)globtest.out): Pass
        $(run-program-prefix) to globtest.sh, not $(elf-objpfx) and
        $(rtld-installed-name).
index 4481cb38c583d711aa9e927cfb84e182d7a8a0d9..1b1604af566102b32a008cc6c9ef918a9aad4363 100644 (file)
@@ -564,6 +564,15 @@ endif
 csu-objpfx = $(common-objpfx)csu/
 elf-objpfx = $(common-objpfx)elf/
 
+# Whether to run test programs built for the library's host system.
+ifndef run-built-tests
+ifeq (yes,$(cross-compiling))
+run-built-tests = no
+else
+run-built-tests = yes
+endif
+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,$^))
diff --git a/Rules b/Rules
index 5e33610e0c4e582557643fb28bf599d022676a8b..db5bad0c859a0aeb70262aef2bad87d002d6c6b0 100644 (file)
--- a/Rules
+++ b/Rules
@@ -94,7 +94,7 @@ others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
 else
 others: $(addprefix $(objpfx),$(extra-objs))
 endif
-ifeq ($(cross-compiling),yes)
+ifeq ($(run-built-tests),no)
 tests: $(addprefix $(objpfx),$(tests) $(test-srcs))
 xtests: tests
 else
index ec8fe1e0bc013558327a149526454f37dd3dfbaf..bbd438a27c3eec14f01b850512e51b09823baca6 100644 (file)
@@ -50,7 +50,7 @@ generated-dirs = de
 
 tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
 
-ifneq ($(cross-compiling),yes)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
        $(objpfx)test-gencat.out
 # This test just checks whether the program produces any error or not.
index c8ae77d8a03d0d20465c0140decc72156adfb721..4f092ab2afb5273aa322cf6c01ab70cde8831382 100644 (file)
@@ -161,7 +161,7 @@ tests += tst-audit6 tst-audit7
 endif
 endif
 endif
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-leaks1-mem $(objpfx)tst-leaks1-static-mem \
        $(objpfx)noload-mem
 endif
@@ -438,7 +438,7 @@ test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
 generated += $(addsuffix .so,$(strip $(modules-names)))
 
 ifeq (yes,$(build-shared))
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out
 endif
 endif
@@ -1174,7 +1174,7 @@ $(objpfx)tst-relsort1mod2.so: $(libm)
 $(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
                           $(objpfx)tst-relsort1mod2.so
 
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-unused-dep.out
 endif
 
index 1988cbf10fbc1425634aaf5afc66fcca3d553949..99ea3a2e68e6c2fd899944f0c9efa657f20bead8 100644 (file)
@@ -50,7 +50,7 @@ CFLAGS-getgrgid.c = -fexceptions
 
 endif
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 # tst_fgetgrent currently only works with shared libraries
 ifeq (yes,$(build-shared))
 tests: $(objpfx)tst_fgetgrent.out
index 6d7791103f9d6c16cf77195826f1d4b19e7b2dcd..4724d4f9ac0f2cb94c352f141a040210fbcfd9ed 100644 (file)
@@ -69,7 +69,7 @@ $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
 $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
 $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
 
-ifneq ($(cross-compiling),yes)
+ifeq ($(run-built-tests),yes)
 xtests: test-iconvconfig
 endif
 
index cf6cf707fe97d37cb4481b7ec29b11774a09b809..89f0dcd9c30c4c5f5f7829d2508b00c604220b72 100644 (file)
@@ -267,7 +267,7 @@ endif # build-shared = yes
 
 include ../Rules
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 ifeq (yes,$(build-shared))
 tests: $(objpfx)iconv-test.out $(objpfx)tst-tables.out
 ifneq (no,$(PERL))
index 5bf66065dabd100c86a4329f064b370e1348679b..c2a169807d992e3793aa11c3e2439e5ac291fb1e 100644 (file)
@@ -48,7 +48,7 @@ $(objpfx)plural.o: plural.c
 
 include ../Rules
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 ifeq (yes,$(build-shared))
 ifneq ($(strip $(MSGFMT)),:)
 tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
index 9601a6ff6c312f9f899cd224e3e4f7303294f3fe..b076e4d8636178203abe72571ac18c6b0136ca6e 100644 (file)
@@ -98,7 +98,7 @@ test-stat2-ARGS = Makefile . $(objpfx)test-stat2
 
 tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp
 
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)ftwtest.out
 
 $(objpfx)ftwtest.out: ftwtest-sh $(objpfx)ftwtest
index 0d28cea59c29c3fed120bd9b55f266eb10dbd2b4..9ccd6a0c38e4245083a0f1b4a4b7ef558f9c9435 100644 (file)
@@ -175,7 +175,7 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops        \
 
 include ../Rules
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)test-freopen.out
 ifeq (yes,$(build-shared))
 # Run tst-fopenloc.check only if shared library is enabled since it
index 7ae362c157894d1667b354ed5076aa8605b6f344..3e775ed4467b1e103fd5b9995d36991f262004c4 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-23  Joseph Myers  <joseph@codesourcery.com>
+
+       * Makefile [$(cross-compiling) = no]: Change condition to
+       [$(run-built-tests) = yes].
+
 2012-10-22  Jim Blandy  <jimb@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>
 
index 5be2413d3cd9bfc84f4f3043c2a3729c000e39f7..d1b277ef31617f76eb074b992d7a91f9646b4db8 100644 (file)
@@ -59,7 +59,7 @@ generated-dirs := $(ld-test-names) tt_TT de_DE.437                    \
 # Get $(inst_i18ndir) defined.
 include ../Makeconfig
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl            \
                     tst_iswctype tst_iswdigit tst_iswgraph            \
                     tst_iswlower tst_iswprint tst_iswpunct            \
@@ -113,7 +113,7 @@ CFLAGS-tst-mbswcs5.c = -Wno-format
 CFLAGS-tst-trans.c = -Wno-format
 
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 # We have to generate locales
 LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \
           en_US.ISO-8859-1 ja_JP.EUC-JP da_DK.ISO-8859-1 \
index 9dd0336d9ee85dbd46b69b6e7ea1430567a6cd02..1e0281f9fac722c1022c3675c195170ab5313e5b 100644 (file)
@@ -104,7 +104,7 @@ $(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
 
 lib: $(objpfx)libmcheck.a
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 ifeq (yes,$(build-shared))
 ifneq ($(PERL),no)
 tests: $(objpfx)tst-mtrace.out
index ea68d26a3ef8ebd7864226b1663da6272fdf3722..4cb7f24e6c2859a447942f7afb382a5a5fbb14b1 100644 (file)
@@ -77,7 +77,7 @@ gpl2lgpl := error.c error.h
 
 tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
         tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-error1-mem
 endif
 
index 10b08426bb7e47e05e1d4951b7a55d1654e528a8..2743631da4127b42ec3bfe09ce263dbdcd7d699e 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-23  Joseph Myers  <joseph@codesourcery.com>
+
+       * Makefile [$(cross-compiling) = no]: Change condition to
+       [$(run-built-tests) = yes].
+
 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>
 
index c37071948fa38777a34892e928c801ef11c57e4c..02db930b6c0d2a8f68d3bfe2d6496676febcc2ad 100644 (file)
@@ -448,7 +448,7 @@ LDFLAGS-tst-atfork2 = -rdynamic
 tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace
 $(objpfx)tst-atfork2mod.so: $(shared-thread-library)
 
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-stack3-mem
 endif
 tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace
@@ -472,7 +472,7 @@ LDFLAGS-tst-tls5 = $(no-as-needed)
 LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
 
 ifeq ($(build-shared),yes)
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-tls6.out
 endif
 $(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \
@@ -583,7 +583,7 @@ generated += banner.h
 LDFLAGS-pthread.so += -e __nptl_main
 endif
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 ifeq (yes,$(build-shared))
 tests: $(objpfx)tst-cancel-wrappers.out
 $(objpfx)tst-cancel-wrappers.out: tst-cancel-wrappers.sh
index 1871e728a5bde59d2440c4af115fd3e988cc7adc..86e6c6bedeba9db8e9c7b4df2d409d4acdc76a65 100644 (file)
@@ -112,7 +112,7 @@ generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
 
 include ../Rules
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 # globtest and wordexp-test currently only works with shared libraries
 ifeq (yes,$(build-shared))
 tests: $(objpfx)globtest.out $(objpfx)wordexp-tst.out
@@ -211,7 +211,7 @@ ptestcases.h: PTESTS PTESTS2C.sed
 # Run a test on the header files we use.
 # XXX Please note that for now we ignore the result of this test.
 tests: $(objpfx)annexc.out
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)bug-regex2-mem $(objpfx)bug-regex14-mem \
   $(objpfx)bug-regex21-mem $(objpfx)bug-regex31-mem $(objpfx)tst-rxspencer-mem\
   $(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem $(objpfx)tst-getconf.out \
index 4777317b17f4eba9d11ddd183516948c619cfaaa..a398694772986e328c5542a8ac3ee815bf6a250f 100644 (file)
@@ -108,7 +108,7 @@ $(objpfx)tst-leaks: $(objpfx)libresolv.so
 tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace
 $(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
        $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 ifneq (no,$(PERL))
 tests: $(objpfx)mtrace-tst-leaks
 endif
@@ -117,7 +117,7 @@ endif
 tst-leaks2-ENV = MALLOC_TRACE=$(objpfx)tst-leaks2.mtrace
 $(objpfx)mtrace-tst-leaks2: $(objpfx)tst-leaks2.out
        $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 ifneq (no,$(PERL))
 xtests: $(objpfx)mtrace-tst-leaks2
 endif
index 5e2e48dfc20fca2b303aded8baba38fd252a415b..f7f152c2d763b35df6ab73ee02db07803f5ae647 100644 (file)
@@ -63,7 +63,7 @@ test-srcs = tst-unbputc tst-printf
 
 include ../Rules
 
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 .PHONY: do-tst-unbputc do-tst-printf
 tests: do-tst-unbputc do-tst-printf
 
index a5318ee00b17e0aeaaf083b02f72bdce65a6bde3..682a70c99862ed64e8157b3d73a80619eb326210 100644 (file)
@@ -122,7 +122,7 @@ bug-fmtmsg1-ENV = SEV_LEVEL=foo,11,newsev
 # Run a test on the header files we use.
 tests: $(objpfx)isomac.out
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-fmtmsg.out
 endif
 
index 54eae7072fb131dee38531e117d827a2b4a6e355..740006e56b44c4074c9ac2ac31d68b378727b7f3 100644 (file)
@@ -78,7 +78,7 @@ CFLAGS-tst-inlcall.c = -fno-builtin
 CFLAGS-bug-strstr1.c = -fno-builtin
 CFLAGS-bug-strcasestr1.c = -fno-builtin
 
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
 tests: $(objpfx)tst-svc.out
 $(objpfx)tst-svc.out: tst-svc.input $(objpfx)tst-svc
        GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \