+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Makefile.in (SELFTEST_TARGETS): New.
+ (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
+ (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
+ (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
+ c/Make-lang.in.
+ (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
+ (selftest-c++-gdb, selftest-c++-valgrind): Move to
+ cp/Make-lang.in.
+ * configure: Regenerate.
+ * configure.ac (selftest_languages): New.
+
2018-10-17 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_multiplicative_op): Remove
SELFTEST_FLAGS = -nostdinc $(DEVNULL) -S -o $(DEVNULL) \
-fself-test=$(srcdir)/testsuite/selftests
-C_SELFTEST_FLAGS = -xc $(SELFTEST_FLAGS)
-CPP_SELFTEST_FLAGS = -xc++ $(SELFTEST_FLAGS)
-
SELFTEST_DEPS = $(GCC_PASSES) stmp-int-hdrs $(srcdir)/testsuite/selftests
-C_SELFTEST_DEPS = cc1$(exeext) $(SELFTEST_DEPS)
-CPP_SELFTEST_DEPS = cc1plus$(exeext) $(SELFTEST_DEPS)
-
# Run the selftests during the build once we have a driver and the frontend,
# so that self-test failures are caught as early as possible.
# Use "s-selftest-FE" to ensure that we only run the selftests if the
# driver, frontend, or selftest data change.
.PHONY: selftest
-# By default, only run the selftests within the C frontend
-selftest: s-selftest-c
-
-# C selftests
-s-selftest-c: $(C_SELFTEST_DEPS)
- $(GCC_FOR_TARGET) $(C_SELFTEST_FLAGS)
- $(STAMP) $@
-
-# Convenience methods for running C selftests under gdb:
-.PHONY: selftest-c-gdb
-selftest-c-gdb: $(C_SELFTEST_DEPS)
- $(GCC_FOR_TARGET) $(C_SELFTEST_FLAGS) \
- -wrapper gdb,--args
-
-.PHONY: selftest-gdb
-selftest-gdb: selftest-c-gdb
-
-# Convenience methods for running C selftests under valgrind:
-.PHONY: selftest-c-valgrind
-selftest-c-valgrind: $(C_SELFTEST_DEPS)
- $(GCC_FOR_TARGET) $(C_SELFTEST_FLAGS) \
- -wrapper valgrind,--leak-check=full
-
-.PHONY: selftest-valgrind
-selftest-valgrind: selftest-c-valgrind
-
-# C++ selftests
-s-selftest-c++: $(CPP_SELFTEST_DEPS)
- $(GCC_FOR_TARGET) $(CPP_SELFTEST_FLAGS)
- $(STAMP) $@
+# Potentially run all selftest-<LANG>. The various <LANG>/Make-lang.in can
+# require the selftests to be run by defining their selftest-<LANG> as
+# s-selftest-<LANG>. Otherwise, they should define it as empty.
-# Convenience method for running C++ selftests under gdb:
-.PHONY: selftest-c++-gdb
-selftest-c++-gdb: $(CPP_SELFTEST_DEPS)
- $(GCC_FOR_TARGET) $(CPP_SELFTEST_FLAGS) \
- -wrapper gdb,--args
-
-# Convenience method for running C++ selftests under valgrind:
-.PHONY: selftest-c++-valgrind
-selftest-c++-valgrind: $(CPP_SELFTEST_DEPS)
- $(GCC_FOR_TARGET) $(CPP_SELFTEST_FLAGS) \
- -wrapper valgrind,--leak-check=full
+SELFTEST_TARGETS = @selftest_languages@
+selftest: $(SELFTEST_TARGETS)
# Recompile all the language-independent object files.
# This is used only if the user explicitly asks for it.
check-ada: check-acats check-gnat
check-ada-subtargets: check-acats-subtargets check-gnat-subtargets
+# No ada-specific selftests
+selftest-ada:
+
ACATSDIR = $(TESTSUITEDIR)/ada/acats
ACATSCMD = run_acats.sh
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-brig): New.
+
2018-07-20 Martin Sebor <msebor@redhat.com>
PR middle-end/82063
lang_checks += check-brig
+# No brig-specific selftests
+selftest-brig:
+
# Install hooks.
brig.install-common: installdirs
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-c): New.
+ (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
+ (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
+ from gcc/Makefile.in.
+
2018-10-02 Richard Biener <rguenther@suse.de>
* c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
c.man:
c.srcman:
+# C selftests
+
+# If C is enabled, require the selftests to be run for it
+# at each stage of the build:
+selftest-c: s-selftest-c
+
+C_SELFTEST_FLAGS = -xc $(SELFTEST_FLAGS)
+C_SELFTEST_DEPS = cc1$(exeext) $(SELFTEST_DEPS)
+
+# Run the C selftests:
+s-selftest-c: $(C_SELFTEST_DEPS)
+ $(GCC_FOR_TARGET) $(C_SELFTEST_FLAGS)
+ $(STAMP) $@
+
+# Convenience methods for running C selftests under gdb:
+.PHONY: selftest-c-gdb
+selftest-c-gdb: $(C_SELFTEST_DEPS)
+ $(GCC_FOR_TARGET) $(C_SELFTEST_FLAGS) \
+ -wrapper gdb,--args
+
+.PHONY: selftest-gdb
+selftest-gdb: selftest-c-gdb
+
+# Convenience methods for running C selftests under valgrind:
+.PHONY: selftest-c-valgrind
+selftest-c-valgrind: $(C_SELFTEST_DEPS)
+ $(GCC_FOR_TARGET) $(C_SELFTEST_FLAGS) \
+ -wrapper valgrind,--leak-check=full
+
+.PHONY: selftest-valgrind
+selftest-valgrind: selftest-c-valgrind
+
# List of targets that can use the generic check- rule and its // variant.
lang_checks += check-gcc
lang_checks_parallelized += check-gcc
tmake_file
xmake_file
cpp_install_dir
+selftest_languages
check_languages
build_file_translate
build_xm_defines
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18512 "configure"
+#line 18513 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18618 "configure"
+#line 18619 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
check_languages="$check_languages check-$language"
done
+selftest_languages=
+for language in $all_selected_languages
+do
+ selftest_languages="$selftest_languages selftest-$language"
+done
+
# We link each language in with a set of hooks, reached indirectly via
# lang.${target}. Only do so for selected languages.
+
# Echo link setup.
check_languages="$check_languages check-$language"
done
+selftest_languages=
+for language in $all_selected_languages
+do
+ selftest_languages="$selftest_languages selftest-$language"
+done
+
# We link each language in with a set of hooks, reached indirectly via
# lang.${target}. Only do so for selected languages.
AC_SUBST(build_xm_defines)
AC_SUBST(build_file_translate)
AC_SUBST(check_languages)
+AC_SUBST(selftest_languages)
AC_SUBST(cpp_install_dir)
AC_SUBST(xmake_file)
AC_SUBST(tmake_file)
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-c++): New.
+ (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
+ (selftest-c++-gdb, selftest-c++-valgrind): Move here from
+ gcc/Makefile.in.
+
2018-10-17 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84705
c++.srcman: doc/g++.1
-cp -p $^ $(srcdir)/doc
+# C++ selftests
+
+# If C++ is enabled, require the selftests to be run for it
+# at each stage of the build:
+selftest-c++: s-selftest-c++
+
+CPP_SELFTEST_DEPS = cc1plus$(exeext) $(SELFTEST_DEPS)
+CPP_SELFTEST_FLAGS = -xc++ $(SELFTEST_FLAGS)
+
+# Run the C++ selftests
+s-selftest-c++: $(CPP_SELFTEST_DEPS)
+ $(GCC_FOR_TARGET) $(CPP_SELFTEST_FLAGS)
+ $(STAMP) $@
+
+# Convenience method for running C++ selftests under gdb:
+.PHONY: selftest-c++-gdb
+selftest-c++-gdb: $(CPP_SELFTEST_DEPS)
+ $(GCC_FOR_TARGET) $(CPP_SELFTEST_FLAGS) \
+ -wrapper gdb,--args
+
+# Convenience method for running C++ selftests under valgrind:
+.PHONY: selftest-c++-valgrind
+selftest-c++-valgrind: $(CPP_SELFTEST_DEPS)
+ $(GCC_FOR_TARGET) $(CPP_SELFTEST_FLAGS) \
+ -wrapper valgrind,--leak-check=full
+
# 'make check' in gcc/ looks for check-c++, as do all toplevel C++-related
# check targets. However, our DejaGNU framework requires 'check-g++' as its
# entry point. We feed the former to the latter here.
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-fortran): New.
+
2018-10-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/56386
# For description see the check_$lang_parallelize comment in gcc/Makefile.in.
check_gfortran_parallelize = 10000
+# No fortran-specific selftests
+selftest-fortran:
+
# GFORTRAN documentation.
GFORTRAN_TEXI = \
$(srcdir)/fortran/gfortran.texi \
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-go): New.
+
2018-09-25 Martin Liska <mliska@suse.cz>
* gofrontend/escape.cc (Gogo::analyze_escape): Remove
lang_checks_parallelized += check-go
check_go_parallelize = 10
+# No go-specific selftests
+selftest-go:
+
# Install hooks.
go.install-common: installdirs
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-jit): New.
+
2018-06-28 Martin Liska <mliska@suse.cz>
* jit-playback.c: Include opt-suggestions.h.
# we want them to be placed in different "buckets".
check_jit_parallelize = 10
+# No jit-specific selftests
+selftest-jit:
+
#\f
# Install hooks:
jit.install-common: installdirs
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-lto): New.
+
2018-08-29 Martin Liska <mliska@suse.cz>
PR bootstrap/87130
# LTO testing is done as part of C/C++/Fortran etc. testing.
check-lto:
+
+# No LTO-specific selftests
+selftest-lto:
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-objc): New.
+
2018-04-20 Martin Liska <mliska@suse.cz>
PR objc/85476
lang_checks_parallelized += check-objc
check_objc_parallelize = 6
+# No objc-c-specific selftests
+selftest-objc:
+
#\f
# Install hooks:
# cc1obj is installed elsewhere as part of $(COMPILERS).
+2018-10-17 David Malcolm <dmalcolm@redhat.com>
+
+ * Make-lang.in (selftest-obj-c++): New.
+
2018-05-07 Nathan Sidwell <nathan@acm.org>
* objcp-lang.c (objcxx_init_ts): Don't call init_shadowed_var_for_decl.
lang_checks += check-obj-c++
+# No objc-c++-specific selftests
+selftest-obj-c++:
+
#\f
# Install hooks:
# cc1objplus is installed elsewhere as part of $(COMPILERS).