* 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.
This commit is contained in:
parent
139e4a7044
commit
3e8cba195d
|
@ -1,3 +1,10 @@
|
|||
2002-07-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* 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.
|
||||
|
||||
2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
* ld-mmix/sec-8m.d, ld-mmix/sec-8m.s, ld-mmix/sec-8a.s,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Support routines for LD testsuite.
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
|
@ -299,9 +299,19 @@ proc default_ld_nm { nm nmflags object } {
|
|||
|
||||
if ![info exists NMFLAGS] { set NMFLAGS "" }
|
||||
|
||||
# Ensure consistent sorting of symbols
|
||||
if {[info exists env(LC_ALL)]} {
|
||||
set old_lc_all $env(LC_ALL)
|
||||
}
|
||||
set env(LC_ALL) "C"
|
||||
verbose -log "$nm $NMFLAGS $nmflags $object >tmpdir/nm.out"
|
||||
|
||||
catch "exec $nm $NMFLAGS $nmflags $object >tmpdir/nm.out" exec_output
|
||||
if {[info exists old_lc_all]} {
|
||||
set env(LC_ALL) $old_lc_all
|
||||
} else {
|
||||
unset env(LC_ALL)
|
||||
}
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
if [string match "" $exec_output] then {
|
||||
set file [open tmpdir/nm.out r]
|
||||
|
@ -474,6 +484,8 @@ proc simple_diff { file_1 file_2 } {
|
|||
# objcopy: FLAGS
|
||||
# Use the specified program to analyze the assembler or linker
|
||||
# output file, and pass it FLAGS, in addition to the output name.
|
||||
# Note that they are run with LC_ALL=C in the environment to give
|
||||
# consistent sorting of symbols.
|
||||
#
|
||||
# source: SOURCE [FLAGS]
|
||||
# Assemble the file SOURCE.s using the flags in the "as" directive
|
||||
|
@ -512,6 +524,7 @@ proc run_dump_test { name } {
|
|||
global OBJDUMP NM AS OBJCOPY READELF LD
|
||||
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS LDFLAGS
|
||||
global host_triplet runtests
|
||||
global env
|
||||
|
||||
if [string match "*/*" $name] {
|
||||
set file $name
|
||||
|
@ -778,27 +791,29 @@ proc run_dump_test { name } {
|
|||
|
||||
# Objcopy, unlike the other two, won't send its output to stdout,
|
||||
# so we have to run it specially.
|
||||
set cmd "$binary $progopts $progopts1 $objfile > $dumpfile"
|
||||
if { $program == "objcopy" } {
|
||||
set cmd "$binary $progopts $progopts1 $objfile $dumpfile"
|
||||
}
|
||||
|
||||
# Ensure consistent sorting of symbols
|
||||
if {[info exists env(LC_ALL)]} {
|
||||
set old_lc_all $env(LC_ALL)
|
||||
}
|
||||
set env(LC_ALL) "C"
|
||||
send_log "$cmd\n"
|
||||
catch "exec $cmd" comp_output
|
||||
set comp_output [prune_warnings $comp_output]
|
||||
if ![string match "" $comp_output] then {
|
||||
send_log "$comp_output\n"
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
if {[info exists old_lc_all]} {
|
||||
set env(LC_ALL) $old_lc_all
|
||||
} else {
|
||||
set cmd "$binary $progopts $progopts1 $objfile > $dumpfile"
|
||||
send_log "$cmd\n"
|
||||
catch "exec $cmd" comp_output
|
||||
unset env(LC_ALL)
|
||||
}
|
||||
set comp_output [prune_warnings $comp_output]
|
||||
if ![string match "" $comp_output] then {
|
||||
send_log "$comp_output\n"
|
||||
fail $testname
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
verbose_eval {[file_contents $dumpfile]} 3
|
||||
if { [regexp_diff $dumpfile "${file}.d"] } then {
|
||||
|
|
Loading…
Reference in New Issue