* lib/ld-lib.exp (run_ld_link_tests): Add another argument, pass
[deliverable/binutils-gdb.git] / ld / testsuite / lib / ld-lib.exp
index 0b156a1048a0e320fe446ec96c904acae7e62fba..4cd671d4734fc4801ac22f9314106006a825a079 100644 (file)
@@ -1000,12 +1000,13 @@ proc ar_simple_create { ar aropts target objects } {
 # List contains test-items with 3 items followed by 2 lists, one item and
 # one optional item:
 #  0:name
-#  1:ld/ar options
-#  2:assembler options
-#  3:filenames of assembler files
-#  4:list of actions, options and expected outputs.
-#  5:name of output file
-#  6:compiler flags (optional)
+#  1:ld/ar leading options, placed before object files
+#  2:ld/ar trailing options, placed after object files
+#  3:assembler options
+#  4:filenames of assembler files
+#  5:list of actions, options and expected outputs.
+#  6:name of output file
+#  7:compiler flags (optional)
 #
 # Actions: { command command-line-options file-containg-expected-output-regexps }
 # Commands:
@@ -1041,11 +1042,12 @@ proc run_ld_link_tests { ldtests } {
        }
 
        set ld_options [lindex $testitem 1]
-       set as_options [lindex $testitem 2]
-       set src_files  [lindex $testitem 3]
-       set actions [lindex $testitem 4]
-       set binfile tmpdir/[lindex $testitem 5]
-       set cflags [lindex $testitem 6]
+       set ld_after [lindex $testitem 2]
+       set as_options [lindex $testitem 3]
+       set src_files  [lindex $testitem 4]
+       set actions [lindex $testitem 5]
+       set binfile tmpdir/[lindex $testitem 6]
+       set cflags [lindex $testitem 7]
        set objfiles {}
        set is_unresolved 0
        set failed 0
@@ -1054,6 +1056,7 @@ proc run_ld_link_tests { ldtests } {
 
 #      verbose -log "Testname is $testname"
 #      verbose -log "ld_options is $ld_options"
+#      verbose -log "ld_after is $ld_after"
 #      verbose -log "as_options is $as_options"
 #      verbose -log "src_files is $src_files"
 #      verbose -log "actions is $actions"
@@ -1087,10 +1090,10 @@ proc run_ld_link_tests { ldtests } {
        }
 
        if { [regexp ".*\\.a$" $binfile] } {
-           if { ![ar_simple_create $ar $ld_options $binfile "$objfiles"] } {
+           if { ![ar_simple_create $ar $ld_options $binfile "$objfiles $ld_after"] } {
                set failed 1
            }
-       } elseif { ![ld_simple_link $ld $binfile "-L$srcdir/$subdir $ld_options $objfiles"] } {
+       } elseif { ![ld_simple_link $ld $binfile "-L$srcdir/$subdir $ld_options $objfiles $ld_after"] } {
            set maybe_failed 1
            set ld_output "$exec_output"
        }
This page took 0.034922 seconds and 4 git commands to generate.