Commit 194fa9a1 by Thomas Schwinge Committed by Thomas Schwinge

In gcc/Makefile.in, factor out SELFTEST_FLAGS

	gcc/
	* Makefile.in (SELFTEST_FLAGS): New variable.
	(s-selftest, selftest-gdb, selftest-valgrind): Use it.

From-SVN: r241043
parent 96f0a513
2016-10-12 Thomas Schwinge <thomas@codesourcery.com> 2016-10-12 Thomas Schwinge <thomas@codesourcery.com>
* Makefile.in (SELFTEST_FLAGS): New variable.
(s-selftest, selftest-gdb, selftest-valgrind): Use it.
* vmsdbgout.c (vmsdbg_debug_hooks): Add filename parameter to * vmsdbgout.c (vmsdbg_debug_hooks): Add filename parameter to
early_finish hook. early_finish hook.
......
...@@ -1877,6 +1877,10 @@ endif ...@@ -1877,6 +1877,10 @@ endif
# This does the things that can't be done on the host machine. # This does the things that can't be done on the host machine.
rest.cross: specs rest.cross: specs
# GCC's selftests.
# Specify a dummy input file to placate the driver.
SELFTEST_FLAGS = -x c /dev/null -S -fself-test
# Run the selftests during the build once we have a driver and a cc1, # Run the selftests during the build once we have a driver and a cc1,
# so that self-test failures are caught as early as possible. # so that self-test failures are caught as early as possible.
# Use "s-selftest" to ensure that we only run the selftests if the # Use "s-selftest" to ensure that we only run the selftests if the
...@@ -1884,18 +1888,19 @@ rest.cross: specs ...@@ -1884,18 +1888,19 @@ rest.cross: specs
.PHONY: selftest .PHONY: selftest
selftest: s-selftest selftest: s-selftest
s-selftest: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs s-selftest: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs
$(GCC_FOR_TARGET) -xc -S -c /dev/null -fself-test $(GCC_FOR_TARGET) $(SELFTEST_FLAGS)
$(STAMP) $@ $(STAMP) $@
# Convenience method for running selftests under gdb: # Convenience method for running selftests under gdb:
.PHONY: selftest-gdb .PHONY: selftest-gdb
selftest-gdb: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs selftest-gdb: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs
$(GCC_FOR_TARGET) -xc -S -c /dev/null -fself-test -wrapper gdb,--args $(GCC_FOR_TARGET) $(SELFTEST_FLAGS) \
-wrapper gdb,--args
# Convenience method for running selftests under valgrind: # Convenience method for running selftests under valgrind:
.PHONY: selftest-valgrind .PHONY: selftest-valgrind
selftest-valgrind: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs selftest-valgrind: $(GCC_PASSES) cc1$(exeext) stmp-int-hdrs
$(GCC_FOR_TARGET) -xc -S -c /dev/null -fself-test \ $(GCC_FOR_TARGET) $(SELFTEST_FLAGS) \
-wrapper valgrind,--leak-check=full -wrapper valgrind,--leak-check=full
# Recompile all the language-independent object files. # Recompile all the language-independent object files.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment