Fix typo in comment in last commit.
[deliverable/binutils-gdb.git] / gold / testsuite / Makefile.am
index 35c7d14967ad2e8d056c5845179ca552310f7743..ffb99c4206824074da1de779997a50f80c9d2f7a 100644 (file)
@@ -17,6 +17,11 @@ INCLUDES = \
        -DLOCALEDIR="\"$(datadir)/locale\"" \
        @INCINTL@
 
+TEST_READELF = $(top_builddir)/../binutils/readelf
+TEST_OBJDUMP = $(top_builddir)/../binutils/objdump
+TEST_CXXFILT = $(top_builddir)/../binutils/cxxfilt
+TEST_STRIP = $(top_builddir)/../binutils/strip-new
+
 if THREADS
 THREADSLIB = -lpthread
 endif
@@ -277,6 +282,19 @@ two_file_mixed_2_shared_test_LDADD = two_file_shared_mixed_1.so two_file_shared_
 
 endif FN_PTRS_IN_SO_WITHOUT_PIC
 
+check_PROGRAMS += two_file_strip_test
+two_file_strip_test: two_file_test
+       $(TEST_STRIP) -o two_file_strip_test two_file_test
+
+check_PROGRAMS += two_file_same_shared_strip_test
+two_file_same_shared_strip_test_SOURCES = two_file_test_main.cc
+two_file_same_shared_strip_test_DEPENDENCIES = \
+       gcctestdir/ld two_file_shared_strip.so
+two_file_same_shared_strip_test_LDFLAGS = -Bgcctestdir/ -Wl,-R.
+two_file_same_shared_strip_test_LDADD = two_file_shared_strip.so
+two_file_shared_strip.so: two_file_shared.so
+       $(TEST_STRIP) -S -o two_file_shared_strip.so two_file_shared.so
+
 check_PROGRAMS += common_test_1
 common_test_1_SOURCES = common_test_1.c
 common_test_1_DEPENDENCIES = gcctestdir/ld
@@ -362,6 +380,30 @@ alt/weak_undef_lib.so: weak_undef_file2.o
        test -d alt || mkdir -p alt
        $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file2.o
 
+check_PROGRAMS += weak_alias_test
+weak_alias_test_SOURCES = weak_alias_test_main.cc
+weak_alias_test_DEPENDENCIES = \
+       gcctestdir/ld weak_alias_test_1.so weak_alias_test_2.so \
+       weak_alias_test_3.o weak_alias_test_4.so
+weak_alias_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+weak_alias_test_LDADD = \
+       weak_alias_test_1.so weak_alias_test_2.so weak_alias_test_3.o \
+       weak_alias_test_4.so
+weak_alias_test_1_pic.o: weak_alias_test_1.cc
+       $(CXXCOMPILE) -c -fpic -o $@ $<
+weak_alias_test_1.so: weak_alias_test_1_pic.o
+       $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_1_pic.o
+weak_alias_test_2_pic.o: weak_alias_test_2.cc
+       $(CXXCOMPILE) -c -fpic -o $@ $<
+weak_alias_test_2.so: weak_alias_test_2_pic.o
+       $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_2_pic.o
+weak_alias_test_3.o: weak_alias_test_3.cc
+       $(CXXCOMPILE) -c -o $@ $<
+weak_alias_test_4_pic.o: weak_alias_test_4.cc
+       $(CXXCOMPILE) -c -fpic -o $@ $<
+weak_alias_test_4.so: weak_alias_test_4_pic.o
+       $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_4_pic.o
+
 if TLS
 
 check_PROGRAMS += tls_test
@@ -518,13 +560,6 @@ undef_symbol.err: undef_symbol_main.o undef_symbol.so gcctestdir/ld
        fi
 
 
-# Test --compress-debug-sections.  FIXME: check we actually compress.
-check_PROGRAMS += flagstest_compress_debug_sections
-flagstest_compress_debug_sections: flagstest_debug.o gcctestdir/ld
-       $(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,--compress-debug-sections=zlib
-       test -s $@
-
-
 # Test -o when emitting to a special file (such as something in /dev).
 check_PROGRAMS += flagstest_o_specialfile
 flagstest_o_specialfile: flagstest_debug.o gcctestdir/ld
@@ -532,6 +567,15 @@ flagstest_o_specialfile: flagstest_debug.o gcctestdir/ld
        chmod a+x $@
        test -s $@
 
+if HAVE_ZLIB
+
+# Test --compress-debug-sections.  FIXME: check we actually compress.
+check_PROGRAMS += flagstest_compress_debug_sections
+flagstest_compress_debug_sections: flagstest_debug.o gcctestdir/ld
+       $(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,--compress-debug-sections=zlib
+       test -s $@
+
+
 # The specialfile output has a tricky case when we also compress debug
 # sections, because it requires output-file resizing.
 check_PROGRAMS += flagstest_o_specialfile_and_compress_debug_sections
@@ -541,6 +585,8 @@ flagstest_o_specialfile_and_compress_debug_sections: flagstest_debug.o \
        chmod a+x $@
        test -s $@
 
+endif HAVE_ZLIB
+
 # Test symbol versioning.
 check_PROGRAMS += ver_test
 ver_test_SOURCES = ver_test_main.cc
@@ -568,21 +614,15 @@ ver_test_2_DEPENDENCIES = gcctestdir/ld ver_test_4.so ver_test_2.so
 ver_test_2_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
 ver_test_2_LDADD = ver_test_4.so ver_test_2.so
 
-if READELF
-
 check_SCRIPTS += ver_test_2.sh
 check_DATA += ver_test_2.syms
 ver_test_2.syms: ver_test_2
-       readelf -s $< >$@ 2>/dev/null
+       $(TEST_READELF) -s $< >$@ 2>/dev/null
 
 check_SCRIPTS += ver_test_4.sh
 check_DATA += ver_test_4.syms
 ver_test_4.syms: ver_test_4.so
-       readelf -s $< >$@ 2>/dev/null
-
-endif
-
-if READELF
+       $(TEST_READELF) -s $< >$@ 2>/dev/null
 
 ver_test_5.so: ver_test_5.o $(srcdir)/ver_test_5.script ver_test_4.so gcctestdir/ld
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_5.script ver_test_5.o ver_test_4.so
@@ -591,9 +631,7 @@ ver_test_5.o: ver_test_5.cc
 check_SCRIPTS += ver_test_5.sh
 check_DATA += ver_test_5.syms
 ver_test_5.syms: ver_test_5.so
-       readelf -s $< >$@ 2>/dev/null
-
-endif
+       $(TEST_READELF) -s $< >$@ 2>/dev/null
 
 check_PROGRAMS += ver_test_6
 ver_test_6_SOURCES = ver_test_6.c
@@ -601,8 +639,6 @@ ver_test_6_DEPENDENCIES = gcctestdir/ld ver_test_2.so
 ver_test_6_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
 ver_test_6_LDADD = ver_test_2.so
 
-if READELF
-
 ver_test_7.so: ver_test_4.o $(srcdir)/ver_test_4.script ver_test_7.o gcctestdir/ld
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_4.script ver_test_4.o ver_test_7.o
 ver_test_7.o: ver_test_7.cc
@@ -610,9 +646,7 @@ ver_test_7.o: ver_test_7.cc
 check_SCRIPTS += ver_test_7.sh
 check_DATA += ver_test_7.syms
 ver_test_7.syms: ver_test_7.so
-       readelf -s $< >$@ 2>/dev/null
-
-endif
+       $(TEST_READELF) -s $< >$@ 2>/dev/null
 
 check_PROGRAMS += script_test_1
 script_test_1_SOURCES = script_test_1.cc
@@ -643,14 +677,13 @@ binary.txt: $(srcdir)/binary.in
        rm -f $@
        $(LN_S) $< $@
 
-if OBJDUMP_AND_CPPFILT
 check_SCRIPTS += ver_matching_test.sh
 check_DATA += ver_matching_test.stdout
 MOSTLYCLEANFILES += ver_matching_test.stdout
 ver_matching_def.so: ver_matching_def.cc gcctestdir/ld
        $(CXXLINK) -O0 -Bgcctestdir/ -shared $(srcdir)/ver_matching_def.cc -Wl,--version-script=$(srcdir)/version_script.map
 ver_matching_test.stdout: ver_matching_def.so
-       objdump -T ver_matching_def.so | c++filt > ver_matching_test.stdout
+       $(TEST_OBJDUMP) -T ver_matching_def.so | $(TEST_CXXFILT) > ver_matching_test.stdout
 
 check_PROGRAMS += script_test_3
 check_SCRIPTS += script_test_3.sh
@@ -659,8 +692,7 @@ MOSTLYCLEANFILES += script_test_3.stdout
 script_test_3: basic_test.o gcctestdir/ld script_test_3.t
        $(CXXLINK) -Bgcctestdir/ basic_test.o -T $(srcdir)/script_test_3.t
 script_test_3.stdout: script_test_3
-       objdump -p script_test_3 > script_test_3.stdout
-endif OBJDUMP_AND_CPPFILT
+       $(TEST_OBJDUMP) -p script_test_3 > script_test_3.stdout
 
 endif GCC
 endif NATIVE_LINKER
This page took 0.024886 seconds and 4 git commands to generate.