| Line 550... |
Line 550... |
set opts(PROG) {}
|
set opts(PROG) {}
|
set opts(source) {}
|
set opts(source) {}
|
set opts(error) {}
|
set opts(error) {}
|
set opts(warning) {}
|
set opts(warning) {}
|
set opts(objcopy_linked_file) {}
|
set opts(objcopy_linked_file) {}
|
set asflags(${file}.s) {}
|
|
|
|
foreach i $opt_array {
|
foreach i $opt_array {
|
set opt_name [lindex $i 0]
|
set opt_name [lindex $i 0]
|
set opt_val [lindex $i 1]
|
set opt_val [lindex $i 1]
|
if ![info exists opts($opt_name)] {
|
if ![info exists opts($opt_name)] {
|
| Line 568... |
Line 567... |
target {}
|
target {}
|
notarget {}
|
notarget {}
|
warning {}
|
warning {}
|
error {}
|
error {}
|
source {
|
source {
|
# Move any source-specific as-flags to a separate array to
|
# Move any source-specific as-flags to a separate list to
|
# simplify processing.
|
# simplify processing.
|
if { [llength $opt_val] > 1 } {
|
if { [llength $opt_val] > 1 } {
|
set asflags([lindex $opt_val 0]) [lrange $opt_val 1 end]
|
lappend asflags [lrange $opt_val 1 end]
|
set opt_val [lindex $opt_val 0]
|
set opt_val [lindex $opt_val 0]
|
} else {
|
} else {
|
set asflags($opt_val) {}
|
lappend asflags {}
|
}
|
}
|
}
|
}
|
default {
|
default {
|
if [string length $opts($opt_name)] {
|
if [string length $opts($opt_name)] {
|
perror "option $opt_name multiply set in $file.d"
|
perror "option $opt_name multiply set in $file.d"
|
| Line 667... |
Line 666... |
set testname $opts(name)
|
set testname $opts(name)
|
}
|
}
|
|
|
if { $opts(source) == "" } {
|
if { $opts(source) == "" } {
|
set sourcefiles [list ${file}.s]
|
set sourcefiles [list ${file}.s]
|
|
set asflags [list ""]
|
} else {
|
} else {
|
set sourcefiles {}
|
set sourcefiles {}
|
foreach sf $opts(source) {
|
foreach sf $opts(source) {
|
if { [string match "/*" $sf] } {
|
if { [string match "/*" $sf] } {
|
lappend sourcefiles "$sf"
|
lappend sourcefiles "$sf"
|
} else {
|
} else {
|
lappend sourcefiles "$srcdir/$subdir/$sf"
|
lappend sourcefiles "$srcdir/$subdir/$sf"
|
}
|
}
|
# Must have asflags indexed on source name.
|
|
set asflags($srcdir/$subdir/$sf) $asflags($sf)
|
|
}
|
}
|
}
|
}
|
|
|
# Time to setup xfailures.
|
# Time to setup xfailures.
|
foreach targ $opts(xfail) {
|
foreach targ $opts(xfail) {
|
| Line 689... |
Line 687... |
|
|
# Assemble each file.
|
# Assemble each file.
|
set objfiles {}
|
set objfiles {}
|
for { set i 0 } { $i < [llength $sourcefiles] } { incr i } {
|
for { set i 0 } { $i < [llength $sourcefiles] } { incr i } {
|
set sourcefile [lindex $sourcefiles $i]
|
set sourcefile [lindex $sourcefiles $i]
|
|
set sourceasflags [lindex $asflags $i]
|
|
|
set objfile "tmpdir/dump$i.o"
|
set objfile "tmpdir/dump$i.o"
|
catch "exec rm -f $objfile" exec_output
|
catch "exec rm -f $objfile" exec_output
|
lappend objfiles $objfile
|
lappend objfiles $objfile
|
set cmd "$AS $ASFLAGS $opts(as) $asflags($sourcefile) -o $objfile $sourcefile"
|
set cmd "$AS $ASFLAGS $opts(as) $sourceasflags -o $objfile $sourcefile"
|
|
|
send_log "$cmd\n"
|
send_log "$cmd\n"
|
set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "ld.tmp"]
|
set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "ld.tmp"]
|
remote_upload host "ld.tmp"
|
remote_upload host "ld.tmp"
|
set comp_output [prune_warnings [file_contents "ld.tmp"]]
|
set comp_output [prune_warnings [file_contents "ld.tmp"]]
|