aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-sh
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-07-02 23:54:39 +0000
committerAlan Modra <amodra@gmail.com>2002-07-02 23:54:39 +0000
commit3e8cba195d4c10a1e67dc1f104251f9d6cd5fe11 (patch)
tree9e9f9dd0c1e2fa42874179fce1133a530b9646dd /ld/testsuite/ld-sh
parent139e4a704495f7f161fef1dfbbad6a0d8cd2e093 (diff)
downloadgdb-3e8cba195d4c10a1e67dc1f104251f9d6cd5fe11.zip
gdb-3e8cba195d4c10a1e67dc1f104251f9d6cd5fe11.tar.gz
gdb-3e8cba195d4c10a1e67dc1f104251f9d6cd5fe11.tar.bz2
* lib/ld-lib.exp (default_ld_nm): Run nm with LC_ALL=C to ensure
consistent sorting. (run_dump_test): Likewise for objdump/nm/objcopy/readelf. * ld-sh/sh64/sh64.exp (run_ld_link_tests): Likewise.
Diffstat (limited to 'ld/testsuite/ld-sh')
-rw-r--r--ld/testsuite/ld-sh/sh64/sh64.exp28
1 files changed, 20 insertions, 8 deletions
diff --git a/ld/testsuite/ld-sh/sh64/sh64.exp b/ld/testsuite/ld-sh/sh64/sh64.exp
index d412a2c..555436e 100644
--- a/ld/testsuite/ld-sh/sh64/sh64.exp
+++ b/ld/testsuite/ld-sh/sh64/sh64.exp
@@ -5,12 +5,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -119,7 +119,7 @@ set sh64tests {
{"SH64 Little Endianness" "-mshlelf64 -Tendian.ld"
"--abi=64 --little" {endian.s}
{{objdump -s endian.sld} {objdump -d endian.dld}}}
-
+
}
# FIXME: Generalize and move this to ld-lib.exp
@@ -132,6 +132,7 @@ proc run_ld_link_tests { ldtests } {
global readelf
global srcdir
global subdir
+ global env
set binfile "tmpdir/linked"
@@ -199,8 +200,19 @@ proc run_ld_link_tests { ldtests } {
set dumpfile [lindex $actionlist 2]
set binary $dump_prog
- send_log "$binary $progopts $binfile > dump.out\n"
- catch "exec $binary $progopts $binfile > dump.out" comp_output
+ # Ensure consistent sorting of symbols
+ if {[info exists env(LC_ALL)]} {
+ set old_lc_all $env(LC_ALL)
+ }
+ set env(LC_ALL) "C"
+ set cmd "$binary $progopts $binfile > dump.out"
+ send_log "$cmd\n"
+ catch "exec $cmd" comp_output
+ if {[info exists old_lc_all]} {
+ set env(LC_ALL) $old_lc_all
+ } else {
+ unset env(LC_ALL)
+ }
set comp_output [prune_warnings $comp_output]
if ![string match "" $comp_output] then {
@@ -300,9 +312,9 @@ proc regexp_diff { file_1 file_2 } {
}
}
- if { $diff_pass } {
- break
- } elseif { $end_1 && $end_2 } {
+ if { $diff_pass } {
+ break
+ } elseif { $end_1 && $end_2 } {
break
} elseif { $end_1 } {
send_log "extra regexps in $file_2 starting with \"^$line_b$\"\nEOF from $file_1\n"