aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2009-03-14 09:09:47 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2009-03-14 09:09:47 +0000
commitfa0a16b19e6701bed945feffd3fb5381759a0005 (patch)
treed8442b300c6bc78c605bbebb06a254f9a98a8112 /ld
parent15f8229bbf3f6fff866cbc04b07ddde9f6e41941 (diff)
downloadgdb-fa0a16b19e6701bed945feffd3fb5381759a0005.zip
gdb-fa0a16b19e6701bed945feffd3fb5381759a0005.tar.gz
gdb-fa0a16b19e6701bed945feffd3fb5381759a0005.tar.bz2
ld/testsuite/
* lib/ld-lib.exp (ar_simple_create): Add an "aropts" parameter. (run_ld_link_tests): Treat the second list element as "ar" options when creating an archive. Don't run the linker in this case. (run_cc_link_tests): Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/lib/ld-lib.exp20
2 files changed, 17 insertions, 10 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 5be4b60..9279df1 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
+
+ * lib/ld-lib.exp (ar_simple_create): Add an "aropts" parameter.
+ (run_ld_link_tests): Treat the second list element as "ar" options
+ when creating an archive. Don't run the linker in this case.
+ (run_cc_link_tests): Likewise.
+
2009-03-13 Nick Clifton <nickc@redhat.com>
* lib/ld-lib.exp (run_dump_test): Add verbose to list of globals.
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 0257cea..f2e0374 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1095,10 +1095,10 @@ proc file_contents { filename } {
# Create an archive using ar
#
-proc ar_simple_create { ar target objects } {
+proc ar_simple_create { ar aropts target objects } {
remote_file host delete $target
- set exec_output [run_host_cmd "$ar" "rc $target $objects"]
+ set exec_output [run_host_cmd "$ar" "$aropts rc $target $objects"]
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
@@ -1111,7 +1111,7 @@ proc ar_simple_create { ar target objects } {
# List contains test-items with 3 items followed by 2 lists, one item and
# one optional item:
-# 0:name 1:ld options 2:assembler options
+# 0:name 1:ld/ar options 2:assembler options
# 3:filenames of assembler files 4: action and options. 5: name of output file
# 6:compiler flags (optional)
#
@@ -1178,14 +1178,14 @@ proc run_ld_link_tests { ldtests } {
continue
}
- if [regexp ".*a$" $binfile] then {
- if ![ar_simple_create $ar $binfile "$objfiles"] {
+ if { [regexp ".*a$" $binfile] } {
+ if { ![ar_simple_create $ar $ld_options $binfile "$objfiles"] } {
fail $testname
set failed 1
} else {
set failed 0
}
- } elseif ![ld_simple_link $ld $binfile "-L$srcdir/$subdir $ld_options $objfiles"] {
+ } elseif { ![ld_simple_link $ld $binfile "-L$srcdir/$subdir $ld_options $objfiles"] } {
fail $testname
set failed 1
} else {
@@ -1428,7 +1428,7 @@ proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
# List contains test-items with 3 items followed by 2 lists, one item and
# one optional item:
# 0:name
-# 1:link options
+# 1:ld or ar options
# 2:compile options
# 3:filenames of source files
# 4:action and options.
@@ -1489,14 +1489,14 @@ proc run_cc_link_tests { ldtests } {
set cc_cmd $CC
}
- if [regexp ".*a$" $binfile] then {
- if ![ar_simple_create $ar $binfile "$objfiles"] {
+ if { [regexp ".*a$" $binfile] } {
+ if { ![ar_simple_create $ar $ldflags $binfile "$objfiles"] } {
fail $testname
set failed 1
} else {
set failed 0
}
- } elseif ![ld_simple_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"] {
+ } elseif { ![ld_simple_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"] } {
fail $testname
set failed 1
} else {