aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-07-25 12:06:52 +0930
committerAlan Modra <amodra@gmail.com>2016-10-07 10:52:13 +1030
commitb62b1f7143c70caf5a14bd9684bbe50f51db706f (patch)
treefb61e721ca7c1753dd52724dc1f3ff272077e9c5 /ld
parentfa549b9484c9ce54fd7528bbf8db5e4b0a94510a (diff)
downloadfsf-binutils-gdb-b62b1f7143c70caf5a14bd9684bbe50f51db706f.zip
fsf-binutils-gdb-b62b1f7143c70caf5a14bd9684bbe50f51db706f.tar.gz
fsf-binutils-gdb-b62b1f7143c70caf5a14bd9684bbe50f51db706f.tar.bz2
Add is_generic_elf to ld/ld-lib.exp
* testsuite/lib/ld-lib.exp (is_generic_elf): New, extracted from.. * testsuite/ld-elf/elf.exp: ..here.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/testsuite/ld-elf/elf.exp14
-rw-r--r--ld/testsuite/lib/ld-lib.exp20
3 files changed, 26 insertions, 13 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index d70cdf0..7be0a2a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-07 Alan Modra <amodra@gmail.com>
+
+ * testsuite/lib/ld-lib.exp (is_generic_elf): New, extracted from..
+ * testsuite/ld-elf/elf.exp: ..here.
+
2016-10-06 Ludovic Courtès <ludo@gnu.org>
* emulparams/elf32bmipn32-defs.sh: Shift quote of
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 872e7f1..59284bd 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -139,19 +139,7 @@ foreach t $test_list {
# Targets using the generic linker backend don't support generating
# an import library.
set xfail_implib ""
-if { [istarget "d30v-*-*"]
- || [istarget "dlx-*-*"]
- || [istarget "fr30-*-*"]
- || ([istarget "frv-*-*"] && ![istarget "frv-*-linux*"])
- || [istarget "ft32-*-*"]
- || [istarget "i860-*-*"]
- || [istarget "i960-*-*"]
- || [istarget "iq2000-*-*"]
- || [istarget "mn10200-*-*"]
- || [istarget "moxie-*-*"]
- || [istarget "msp430-*-*"]
- || [istarget "mt-*-*"]
- || [istarget "pj*-*-*"] } {
+if [is_generic_elf] {
set xfail_implib "*-*-*"
}
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 616ac51..49c1fb1 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1773,6 +1773,26 @@ proc check_shared_lib_support { } {
return 0
}
+# Return true if target uses genelf.em (assuming it is ELF).
+proc is_generic_elf { } {
+ if { [istarget "d30v-*-*"]
+ || [istarget "dlx-*-*"]
+ || [istarget "fr30-*-*"]
+ || ([istarget "frv-*-*"] && ![istarget "frv-*-linux*"])
+ || [istarget "ft32-*-*"]
+ || [istarget "i860-*-*"]
+ || [istarget "i960-*-*"]
+ || [istarget "iq2000-*-*"]
+ || [istarget "mn10200-*-*"]
+ || [istarget "moxie-*-*"]
+ || [istarget "msp430-*-*"]
+ || [istarget "mt-*-*"]
+ || [istarget "pj*-*-*"] } {
+ return 1;
+ }
+ return 0;
+}
+
# Returns true if the target ld supports the plugin API.
proc check_plugin_api_available { } {
global plugin_api_available_saved