ld/testsuite/
[platform/upstream/binutils.git] / ld / testsuite / ld-size / size.exp
index 9fe152c..9eedfd5 100644 (file)
@@ -35,6 +35,13 @@ if {!(([istarget "i?86-*-*"]
     return
 }
 
+# So as to avoid rewriting every last test case here in a nacl variant,
+# we use black magic to massage the generic cases into nacl-variant cases.
+if [istarget "*-*-nacl*"] {
+    # Change all the -melf_i386 to -melf_i386_nacl so linking can succeed.
+    set options_regsub(ld) {-m(\\S+) -m\\1_nacl}
+}
+
 set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
 foreach t $test_list {
     # We need to strip the ".d", but can leave the dirname.
@@ -44,7 +51,7 @@ foreach t $test_list {
 
 # We need a native system.
 if ![isnative] {
-    verbose "Natibe size relocation tests not run - not a native toolchain"
+    verbose "Native size relocation tests not run - not a native toolchain"
     return
 }