alpha testsuite fixes

Alan Modra amodra@gmail.com
Tue Oct 23 10:35:00 GMT 2018


Fixes a couple of ERROR results due to .set difference on alpha.

	* testsuite/ld-elf/shared.exp: Don't build pr19073 test on alpha.
	* testsuite/ld-elf/pr18720b.c: Don't use .set on alpha.

diff --git a/ld/testsuite/ld-elf/pr18720b.c b/ld/testsuite/ld-elf/pr18720b.c
index 6a2975dca7..3644e5dfc6 100644
--- a/ld/testsuite/ld-elf/pr18720b.c
+++ b/ld/testsuite/ld-elf/pr18720b.c
@@ -7,7 +7,11 @@ foo (void)
 }
 
 asm (".symver foo,foo@FOO");
+#ifdef __alpha__
+asm ("foo_alias = foo");
+#else
 asm (".set foo_alias,foo");
+#endif
 asm (".global foo_alias");
 #if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
 asm (".symver .foo,.foo@FOO");
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index c894d2196b..4c1b2ef511 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -741,12 +741,19 @@ set build_tests {
   {"Build libpr18458b.so"
    "-shared -Wl,-z,now tmpdir/libpr18458a.so" "-fPIC"
    {pr18458b.c} {} "libpr18458b.so"}
-  {"Build pr19073a.o"
-   "-r -nostdlib" ""
-   {pr19073.s} {} "pr19073a.o"}
-  {"Build libpr19073.so"
-   "-shared -Wl,--version-script=pr19073.map tmpdir/pr19073a.o" "-fPIC"
-   {dummy.c} {{readelf {--dyn-syms --wide} pr19073.rd}} "libpr19073.so"}
+}
+# pr19073.s uses .set, which has a different meaning on alpha.
+if { ![istarget alpha-*-*] } {
+    append build_tests {
+	{"Build pr19073a.o"
+	 "-r -nostdlib" ""
+	 {pr19073.s} {} "pr19073a.o"}
+	{"Build libpr19073.so"
+	 "-shared -Wl,--version-script=pr19073.map tmpdir/pr19073a.o" "-fPIC"
+	 {dummy.c} {{readelf {--dyn-syms --wide} pr19073.rd}} "libpr19073.so"}
+    }
+}
+append build_tests {
   {"Build pr21964-1a.so"
    "-shared" "-fPIC"
    {pr21964-1a.c} {} "pr21964-1a.so"}

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list