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).
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,$^))
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
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.
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
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
$(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
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
$(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
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))
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 \
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
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
+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>
# 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 \
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 \
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
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
+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>
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
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 \
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
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
# 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 \
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
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
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
# 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
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 \