From: Sriraman Tallam Date: Fri, 22 May 2009 20:27:52 +0000 (+0000) Subject: * testsuite/Makefile.am: Add -ffunction-sections to compile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4daadc0d02d6b55962e561882f4768c0c9699010;p=binutils-gdb.git * 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. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index a56d2e9d0c8..9e092e24afe 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 766807353e6..aeee0a67b93 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 77ebf90adcd..c4ad51b120c 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 875d6d73879..baff98d0205 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"