From 4daadc0d02d6b55962e561882f4768c0c9699010 Mon Sep 17 00:00:00 2001 From: Sriraman Tallam Date: Fri, 22 May 2009 20:27:52 +0000 Subject: [PATCH] * testsuite/Makefile.am: Add -ffunction-sections to compile gc_comdat_test files. Add -Wl,--gc-sections to build gc_comdat_test. * testsuite/Makefile.in: Regenerate. * testsuite/gc_comdat_test.sh: Fix the condition around grep. --- gold/ChangeLog | 8 ++++++++ gold/testsuite/Makefile.am | 6 +++--- gold/testsuite/Makefile.in | 6 +++--- gold/testsuite/gc_comdat_test.sh | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index a56d2e9..9e092e2 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,11 @@ +2009-05-22 Sriraman Tallam + + * testsuite/Makefile.am: Add -ffunction-sections to compile + gc_comdat_test files. Add -Wl,--gc-sections to build + gc_comdat_test. + * testsuite/Makefile.in: Regenerate. + * testsuite/gc_comdat_test.sh: Fix the condition around grep. + 2009-05-21 Sriraman Tallam * object.cc (Sized_relobj::map_to_kept_section): Return NULL if the diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 7668073..aeee0a6 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -107,11 +107,11 @@ flagstest_ndebug.o: constructor_test.cc check_SCRIPTS += gc_comdat_test.sh check_DATA += gc_comdat_test.stdout gc_comdat_test_1.o: gc_comdat_test_1.cc - $(CXXCOMPILE) -O0 -c -g -o $@ $< + $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $< gc_comdat_test_2.o: gc_comdat_test_2.cc - $(CXXCOMPILE) -O0 -c -g -o $@ $< + $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $< gc_comdat_test: gc_comdat_test_1.o gc_comdat_test_2.o gcctestdir/ld - $(CXXLINK) -Bgcctestdir/ --gc-sections gc_comdat_test_1.o gc_comdat_test_2.o + $(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_comdat_test_1.o gc_comdat_test_2.o gc_comdat_test.stdout: gc_comdat_test $(TEST_NM) -C gc_comdat_test > gc_comdat_test.stdout diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index 77ebf90..c4ad51b 100644 --- a/gold/testsuite/Makefile.in +++ b/gold/testsuite/Makefile.in @@ -2226,11 +2226,11 @@ uninstall-am: uninstall-info-am @GCC_TRUE@@NATIVE_LINKER_TRUE@flagstest_ndebug.o: constructor_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -o $@ $< @GCC_TRUE@@NATIVE_LINKER_TRUE@gc_comdat_test_1.o: gc_comdat_test_1.cc -@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -g -o $@ $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $< @GCC_TRUE@@NATIVE_LINKER_TRUE@gc_comdat_test_2.o: gc_comdat_test_2.cc -@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -g -o $@ $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $< @GCC_TRUE@@NATIVE_LINKER_TRUE@gc_comdat_test: gc_comdat_test_1.o gc_comdat_test_2.o gcctestdir/ld -@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ --gc-sections gc_comdat_test_1.o gc_comdat_test_2.o +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_comdat_test_1.o gc_comdat_test_2.o @GCC_TRUE@@NATIVE_LINKER_TRUE@gc_comdat_test.stdout: gc_comdat_test @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) -C gc_comdat_test > gc_comdat_test.stdout @GCC_TRUE@@NATIVE_LINKER_TRUE@basic_test.o: basic_test.cc diff --git a/gold/testsuite/gc_comdat_test.sh b/gold/testsuite/gc_comdat_test.sh index 875d6d7..baff98d 100755 --- a/gold/testsuite/gc_comdat_test.sh +++ b/gold/testsuite/gc_comdat_test.sh @@ -29,7 +29,7 @@ check() { - if ! grep -q "$2" "$1" + if grep -q "$2" "$1" then echo "Garbage collection failed to collect :" echo " $2" -- 2.7.4