aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-14 18:37:00 +0000
committerIan Lance Taylor <iant@google.com>2007-11-14 18:37:00 +0000
commiteb01e199fdf149d5e17945ebe6a413c07d278620 (patch)
treee97799f125722b346da8e695b3362e3bf729c33a /gold
parenta18f2bd699004425944ed7633fdd792a6e332c96 (diff)
downloadgdb-eb01e199fdf149d5e17945ebe6a413c07d278620.zip
gdb-eb01e199fdf149d5e17945ebe6a413c07d278620.tar.gz
gdb-eb01e199fdf149d5e17945ebe6a413c07d278620.tar.bz2
If generating a .err file fails, remove it.
Diffstat (limited to 'gold')
-rw-r--r--gold/testsuite/Makefile.am2
-rw-r--r--gold/testsuite/Makefile.in2
2 files changed, 4 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 520863f..622f4fc 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -134,6 +134,7 @@ debug_msg.err: debug_msg.o odr_violation1.o odr_violation2.o gcctestdir/ld
@if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \
then \
echo 1>&2 "Link of debug_msg.o should have failed"; \
+ rm -f $@; \
exit 1; \
fi
@@ -146,6 +147,7 @@ undef_symbol.err: undef_symbol_main.o undef_symbol.so gcctestdir/ld
@if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \
then \
echo 1>&2 "Link of undef_symbol_test should have failed"; \
+ rm -f $@; \
exit 1; \
fi
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index b201423..00d7289 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -1220,6 +1220,7 @@ uninstall-am: uninstall-info-am
@GCC_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ then \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of debug_msg.o should have failed"; \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ fi
@@ -1232,6 +1233,7 @@ uninstall-am: uninstall-info-am
@GCC_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ then \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of undef_symbol_test should have failed"; \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ fi