aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/lib
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-09-18 18:23:06 +0000
committerIan Lance Taylor <ian@airs.com>1995-09-18 18:23:06 +0000
commit5f4c7a8dec02aae1b5898b05cb0ebc52289b99f3 (patch)
treec570696674f2e3db9673dae06e681633b3ed6ae4 /ld/testsuite/lib
parent336933a86366c8fb4b923be664dc564c568ca10d (diff)
downloadgdb-5f4c7a8dec02aae1b5898b05cb0ebc52289b99f3.zip
gdb-5f4c7a8dec02aae1b5898b05cb0ebc52289b99f3.tar.gz
gdb-5f4c7a8dec02aae1b5898b05cb0ebc52289b99f3.tar.bz2
* lib/ld.exp (default_ld_version): Call prune_system_crud.
(default_ld_relocate, default_ld_link): Likewise. (default_ld_simple_link, default_ld_compile): Likewise. (default_ld_assemble, default_ld_nm): Likewise.
Diffstat (limited to 'ld/testsuite/lib')
-rw-r--r--ld/testsuite/lib/ld.exp20
1 files changed, 17 insertions, 3 deletions
diff --git a/ld/testsuite/lib/ld.exp b/ld/testsuite/lib/ld.exp
index 0121c0d..55994d0 100644
--- a/ld/testsuite/lib/ld.exp
+++ b/ld/testsuite/lib/ld.exp
@@ -3,12 +3,15 @@
# extract and print the version number of ld
#
proc default_ld_version { ld } {
+ global host_triplet
+
if { [which $ld] == 0 } then {
perror "$ld does not exist"
exit 1
}
- set tmp [exec $ld --version]
+ catch "exec $ld --version" tmp
+ set tmp [prune_system_crud $host_triplet $tmp]
regexp "version.*$" $tmp version
if [info exists version] then {
@@ -21,8 +24,8 @@ proc default_ld_version { ld } {
# link an object using relocation
#
proc default_ld_relocate { ld target objects } {
-
global HOSTING_EMU
+ global host_triplet
if { [which $ld] == 0 } then {
perror "$ld does not exist"
@@ -33,6 +36,7 @@ proc default_ld_relocate { ld target objects } {
verbose "$ld $HOSTING_EMU -o $target -r $objects"
catch "exec $ld $HOSTING_EMU -o $target -r $objects" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if [string match "" $exec_output] then {
return 1
} else {
@@ -48,10 +52,10 @@ proc default_ld_relocate { ld target objects } {
# link a program using ld
#
proc default_ld_link { ld target objects } {
-
global HOSTING_EMU
global HOSTING_CRT0
global HOSTING_LIBS
+ global host_triplet
set objs "$HOSTING_CRT0 $objects"
set libs "$HOSTING_LIBS"
@@ -65,6 +69,7 @@ proc default_ld_link { ld target objects } {
verbose "$ld $HOSTING_EMU -o $target $objs $libs"
catch "exec $ld $HOSTING_EMU -o $target $objs $libs" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if [string match "" $exec_output] then {
return 1
} else {
@@ -79,6 +84,7 @@ proc default_ld_link { ld target objects } {
# link a program using ld, without including any libraries
#
proc default_ld_simple_link { ld target objects } {
+ global host_triplet
if { [which $ld] == 0 } then {
perror "$ld does not exist"
@@ -89,6 +95,7 @@ proc default_ld_simple_link { ld target objects } {
verbose "$ld -o $target $objects"
catch "exec $ld -o $target $objects" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if [string match "" $exec_output] then {
return 1
} else {
@@ -106,6 +113,7 @@ proc default_ld_compile { cc source object } {
global CFLAGS
global srcdir
global subdir
+ global host_triplet
set cc_prog $cc
if {[llength $cc_prog] > 1} then {
@@ -122,6 +130,7 @@ proc default_ld_compile { cc source object } {
verbose "$cc -I$srcdir$subdir -c $CFLAGS $source -o $object"
catch "exec $cc -I$srcdir$subdir -c $CFLAGS $source -o $object" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if [string match "" $exec_output] then {
if {![file exists $object]} then {
regexp ".*/(\[^/\]*)$" $source all dobj
@@ -131,6 +140,7 @@ proc default_ld_compile { cc source object } {
send_log "mv $realobj $object\n"
verbose "mv $realobj $object"
catch "exec mv $realobj $object" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if {![string match "" $exec_output]} then {
send_log "$exec_output\n"
verbose "$exec_output"
@@ -157,6 +167,7 @@ proc default_ld_compile { cc source object } {
#
proc default_ld_assemble { as source object } {
global ASFLAGS
+ global host_triplet
if {[which $as] == 0} then {
perror "$as does not exist"
@@ -169,6 +180,7 @@ proc default_ld_assemble { as source object } {
verbose "$as $ASFLAGS -o $object $source"
catch "exec $as $ASFLAGS -o $object $source" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if [string match "" $exec_output] then {
return 1
} else {
@@ -186,6 +198,7 @@ proc default_ld_assemble { as source object } {
proc default_ld_nm { nm object } {
global NMFLAGS
global nm_output
+ global host_triplet
if {[which $nm] == 0} then {
perror "$nm does not exist"
@@ -198,6 +211,7 @@ proc default_ld_nm { nm object } {
verbose "$nm $NMFLAGS $object >tmpdir/nm.out"
catch "exec $nm $NMFLAGS $object >tmpdir/nm.out" exec_output
+ set exec_output [prune_system_crud $host_triplet $exec_output]
if [string match "" $exec_output] then {
set file [open tmpdir/nm.out r]
while { [gets $file line] != -1 } {