aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-01-27 10:51:52 +1030
committerAlan Modra <amodra@gmail.com>2020-01-27 22:52:15 +1030
commite3696f67abfc46dcac6c9bbe47f8e25e34b17be5 (patch)
treee241615305663b2d2fee857efefb7001014b78b1 /ld
parent7568c93bf95a518797dfb2987b04911164c14a36 (diff)
downloadfsf-binutils-gdb-e3696f67abfc46dcac6c9bbe47f8e25e34b17be5.zip
fsf-binutils-gdb-e3696f67abfc46dcac6c9bbe47f8e25e34b17be5.tar.gz
fsf-binutils-gdb-e3696f67abfc46dcac6c9bbe47f8e25e34b17be5.tar.bz2
Replace deprecated tcl case statements with switch statements
binutils/ * testsuite/lib/binutils-common.exp (big_or_little_endian): Replace case statement with switch statement. gas/ * testsuite/gas/all/gas.exp: Replace case statements with switch statements. * testsuite/gas/elf/elf.exp: Likewise. * testsuite/gas/macros/macros.exp: Likewise. * testsuite/lib/gas-defs.exp: Likewise. ld/ * testsuite/ld-elfvers/vers.exp: Replace case statements with switch statements. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-unique/unique.exp: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/testsuite/ld-elfvers/vers.exp6
-rw-r--r--ld/testsuite/ld-ifunc/ifunc.exp4
-rw-r--r--ld/testsuite/ld-unique/unique.exp4
4 files changed, 14 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b39c8c0..fe87678 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2020-01-27 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-elfvers/vers.exp: Replace case statements with
+ switch statements.
+ * testsuite/ld-ifunc/ifunc.exp: Likewise.
+ * testsuite/ld-unique/unique.exp: Likewise.
+
2020-01-27 H.J. Lu <hongjiu.lu@intel.com>
Alan Modra <amodra@gmail.com>
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index e0ece08..6ab1e75 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -92,9 +92,9 @@ if { [istarget mips*-*-*] && ! [at_least_gcc_version 4 3] } then {
}
}
-case $target_triplet in {
- { ia64-*-* } { set as_options "-x" }
- { sparc-*-* } { set as_options "-Av9a" }
+switch -glob $target_triplet {
+ ia64-*-* { set as_options "-x" }
+ sparc-*-* { set as_options "-Av9a" }
default { set as_options "" }
}
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index 3ef3224..4e9e83b 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -268,8 +268,8 @@ if { $fails == 0 } {
# ifunc should have an OSABI field of GNU. The linked non-ifunc using
# executable should have an OSABI field of NONE (aka System V).
-case $target_triplet in {
- { hppa*-*-linux* } { set expected_none {UNIX - GNU} }
+switch -glob $target_triplet {
+ hppa*-*-linux* { set expected_none {UNIX - GNU} }
default { set expected_none {UNIX - System V} }
}
diff --git a/ld/testsuite/ld-unique/unique.exp b/ld/testsuite/ld-unique/unique.exp
index f9dd870..5457deb 100644
--- a/ld/testsuite/ld-unique/unique.exp
+++ b/ld/testsuite/ld-unique/unique.exp
@@ -163,8 +163,8 @@ if { $fails == 0 } {
}
# Check the empty object file.
-case $target_triplet in {
- { hppa*-*-linux* } { set expected_none {UNIX - GNU} }
+switch -glob $target_triplet {
+ hppa*-*-linux* { set expected_none {UNIX - GNU} }
default { set expected_none {UNIX - System V} }
}
if {! [check_osabi tmpdir/unique_empty.o $expected_none]} {