Commit 11289ef9 by Ben Elliston Committed by Ben Elliston

vlad.exp: Remove trailing semicolons.

	* consistency.vlad/vlad.exp: Remove trailing semicolons.
	* g++.dg/gcov/gcov.exp: Likewise.
	* gcc.c-torture/execute/ieee/ieee.exp: Likewise.
	* gcc.target/xstormy16/xstormy16.exp: Likewise.
	* lib/c-torture.exp: Likewise.
	* lib/fortran-torture.exp: Likewise.
	* lib/g++.exp: Likewise.
	* lib/gcc-defs.exp: Likewise.
	* lib/gcc-dg.exp: Likewise.
	* lib/gcc.exp: Likewise.
	* lib/gcov.exp: Likewise.
	* lib/gfortran.exp: Likewise.
	* lib/mike-g++.exp: Likewise.
	* lib/mike-gcc.exp: Likewise.
	* lib/objc-torture.exp: Likewise.
	* lib/objc.exp: Likewise.
	* lib/profopt.exp: Likewise.
	* lib/target-libpath.exp: Likewise.
	* lib/target-supports.exp: Likewise.
	* lib/treelang.exp: Likewise.
	* lib/wrapper.exp: Likewise.

From-SVN: r96132
parent 391bdf45
2005-03-09 Ben Elliston <bje@au.ibm.com>
* consistency.vlad/vlad.exp: Remove trailing semicolons.
* g++.dg/gcov/gcov.exp: Likewise.
* gcc.c-torture/execute/ieee/ieee.exp: Likewise.
* gcc.target/xstormy16/xstormy16.exp: Likewise.
* lib/c-torture.exp: Likewise.
* lib/fortran-torture.exp: Likewise.
* lib/g++.exp: Likewise.
* lib/gcc-defs.exp: Likewise.
* lib/gcc-dg.exp: Likewise.
* lib/gcc.exp: Likewise.
* lib/gcov.exp: Likewise.
* lib/gfortran.exp: Likewise.
* lib/mike-g++.exp: Likewise.
* lib/mike-gcc.exp: Likewise.
* lib/objc-torture.exp: Likewise.
* lib/objc.exp: Likewise.
* lib/profopt.exp: Likewise.
* lib/target-libpath.exp: Likewise.
* lib/target-supports.exp: Likewise.
* lib/treelang.exp: Likewise.
* lib/wrapper.exp: Likewise.
2005-03-08 Jeff Law <law@redhat.com> 2005-03-08 Jeff Law <law@redhat.com>
* gcc.dg/tree-ssa/20030728-1.c: Update to account for recent * gcc.dg/tree-ssa/20030728-1.c: Update to account for recent
......
...@@ -111,7 +111,7 @@ proc c-consistency-execute { src cpp_flag out_suffix} { ...@@ -111,7 +111,7 @@ proc c-consistency-execute { src cpp_flag out_suffix} {
close $fd close $fd
} }
set comp_output [gcc_target_compile "$cpp_flag $src -x none $wrap_file" "$executable" executable $options]; set comp_output [gcc_target_compile "$cpp_flag $src -x none $wrap_file" "$executable" executable $options]
# Set a few common compiler messages. # Set a few common compiler messages.
set fatal_signal "*cc: Internal compiler error: program*got fatal signal" set fatal_signal "*cc: Internal compiler error: program*got fatal signal"
...@@ -157,7 +157,7 @@ proc c-consistency-execute { src cpp_flag out_suffix} { ...@@ -157,7 +157,7 @@ proc c-consistency-execute { src cpp_flag out_suffix} {
# Check for compilation only. # Check for compilation only.
if [file exists $rootname.conly] { if [file exists $rootname.conly] {
remote_file build delete $executable remote_file build delete $executable
return; return
} }
# See if this source file uses "long long" types, if it does, and # See if this source file uses "long long" types, if it does, and
...@@ -175,8 +175,8 @@ proc c-consistency-execute { src cpp_flag out_suffix} { ...@@ -175,8 +175,8 @@ proc c-consistency-execute { src cpp_flag out_suffix} {
set exec_output "" set exec_output ""
set result [consistency_load "$executable" "" ""] set result [consistency_load "$executable" "" ""]
set status [lindex $result 0]; set status [lindex $result 0]
set exec_output [lindex $result 1]; set exec_output [lindex $result 1]
# Strip random whitespace junk from the output. the # Strip random whitespace junk from the output. the
# whitejunk is an artifact of the way we get output # whitejunk is an artifact of the way we get output
......
...@@ -33,9 +33,9 @@ if { ![is_remote host] && [string match "*/*" [lindex $GXX_UNDER_TEST 0]] } { ...@@ -33,9 +33,9 @@ if { ![is_remote host] && [string match "*/*" [lindex $GXX_UNDER_TEST 0]] } {
dg-init dg-init
# Delete old .gcda files. # Delete old .gcda files.
set files [glob -nocomplain gcov-*.gcda]; set files [glob -nocomplain gcov-*.gcda]
if { $files != "" } { if { $files != "" } {
eval "remote_file build delete $files"; eval "remote_file build delete $files"
} }
# Main loop. # Main loop.
......
...@@ -31,7 +31,7 @@ if $tracelevel then { ...@@ -31,7 +31,7 @@ if $tracelevel then {
strace $tracelevel strace $tracelevel
} }
set additional_flags ""; set additional_flags ""
# We must use -ffloat-store/-mieee to ensure that excess precision on some # We must use -ffloat-store/-mieee to ensure that excess precision on some
# machines does not cause problems # machines does not cause problems
......
...@@ -33,9 +33,9 @@ if { ![is_remote host] && [string match "*/*" [lindex $GCC_UNDER_TEST 0]] } { ...@@ -33,9 +33,9 @@ if { ![is_remote host] && [string match "*/*" [lindex $GCC_UNDER_TEST 0]] } {
dg-init dg-init
# Delete old .gcda files. # Delete old .gcda files.
set files [glob -nocomplain gcov-*.gcda]; set files [glob -nocomplain gcov-*.gcda]
if { $files != "" } { if { $files != "" } {
eval "remote_file build delete $files"; eval "remote_file build delete $files"
} }
# Main loop. # Main loop.
......
...@@ -19,7 +19,7 @@ set dg-do-what-default run ...@@ -19,7 +19,7 @@ set dg-do-what-default run
# Main loop. # Main loop.
foreach testcase [lsort [find $srcdir/$subdir *.c]] { foreach testcase [lsort [find $srcdir/$subdir *.c]] {
global test_counts; global test_counts
set base "[file rootname [file tail $testcase]]" set base "[file rootname [file tail $testcase]]"
......
...@@ -80,7 +80,7 @@ proc c-torture-compile { src option } { ...@@ -80,7 +80,7 @@ proc c-torture-compile { src option } {
set options "" set options ""
lappend options "additional_flags=-w $option" lappend options "additional_flags=-w $option"
set comp_output [gcc_target_compile "$src" "$output" object $options]; set comp_output [gcc_target_compile "$src" "$output" object $options]
gcc_check_compile $testcase $option $output $comp_output gcc_check_compile $testcase $option $output $comp_output
remote_file build delete $output remote_file build delete $output
} }
...@@ -102,9 +102,9 @@ proc c-torture-execute { sources args } { ...@@ -102,9 +102,9 @@ proc c-torture-execute { sources args } {
set src [lindex $sources 0] set src [lindex $sources 0]
if { [llength $args] > 0 } { if { [llength $args] > 0 } {
set additional_flags [lindex $args 0]; set additional_flags [lindex $args 0]
} else { } else {
set additional_flags ""; set additional_flags ""
} }
# Check for alternate driver. # Check for alternate driver.
if [file exists [file rootname $src].x] { if [file exists [file rootname $src].x] {
...@@ -136,14 +136,14 @@ proc c-torture-execute { sources args } { ...@@ -136,14 +136,14 @@ proc c-torture-execute { sources args } {
set testcase "[file tail [file dirname $src]]/[file tail $src]" set testcase "[file tail [file dirname $src]]/[file tail $src]"
} }
set count 0; set count 0
set oldstatus "foo"; set oldstatus "foo"
foreach option $option_list { foreach option $option_list {
if { $count > 0 } { if { $count > 0 } {
set oldexec $execname; set oldexec $execname
} }
set execname "${executable}${count}"; set execname "${executable}${count}"
incr count; incr count
# torture_{compile,execute}_xfail are set by the .x script # torture_{compile,execute}_xfail are set by the .x script
# (if present) # (if present)
...@@ -157,15 +157,15 @@ proc c-torture-execute { sources args } { ...@@ -157,15 +157,15 @@ proc c-torture-execute { sources args } {
set ignore_me [eval $torture_eval_before_compile] set ignore_me [eval $torture_eval_before_compile]
} }
remote_file build delete $execname; remote_file build delete $execname
verbose "Testing $testcase, $option" 1 verbose "Testing $testcase, $option" 1
set options "" set options ""
lappend options "additional_flags=-w $option" lappend options "additional_flags=-w $option"
if { $additional_flags != "" } { if { $additional_flags != "" } {
lappend options "additional_flags=$additional_flags"; lappend options "additional_flags=$additional_flags"
} }
set comp_output [gcc_target_compile "$sources" "${execname}" executable $options]; set comp_output [gcc_target_compile "$sources" "${execname}" executable $options]
if ![gcc_check_compile "$testcase compilation" $option $execname $comp_output] { if ![gcc_check_compile "$testcase compilation" $option $execname $comp_output] {
unresolved "$testcase execution, $option" unresolved "$testcase execution, $option"
...@@ -204,26 +204,26 @@ proc c-torture-execute { sources args } { ...@@ -204,26 +204,26 @@ proc c-torture-execute { sources args } {
# Do not do this for native testing since the cost to load/execute # Do not do this for native testing since the cost to load/execute
# the test is fairly small and the comparison step actually slows # the test is fairly small and the comparison step actually slows
# the entire process down because it usually does not "hit". # the entire process down because it usually does not "hit".
set skip 0; set skip 0
if { ![isnative] && [info exists oldexec] } { if { ![isnative] && [info exists oldexec] } {
if { [remote_file build cmp $oldexec $execname] == 0 } { if { [remote_file build cmp $oldexec $execname] == 0 } {
set skip 1; set skip 1
} }
} }
if { $skip == 0 } { if { $skip == 0 } {
set result [gcc_load "$execname" "" ""] set result [gcc_load "$execname" "" ""]
set status [lindex $result 0]; set status [lindex $result 0]
set output [lindex $result 1]; set output [lindex $result 1]
} }
if { $oldstatus == "pass" } { if { $oldstatus == "pass" } {
remote_file build delete $oldexec; remote_file build delete $oldexec
} }
$status "$testcase execution, $option" $status "$testcase execution, $option"
set oldstatus $status; set oldstatus $status
} }
if [info exists status] { if [info exists status] {
if { $status == "pass" } { if { $status == "pass" } {
remote_file build delete $execname; remote_file build delete $execname
} }
} }
} }
...@@ -257,9 +257,9 @@ proc search_for { file pattern } { ...@@ -257,9 +257,9 @@ proc search_for { file pattern } {
proc c-torture { args } { proc c-torture { args } {
global srcdir subdir compiler_conditional_xfail_data global srcdir subdir compiler_conditional_xfail_data
set src [lindex $args 0]; set src [lindex $args 0]
if { [llength $args] > 1 } { if { [llength $args] > 1 } {
set options [lindex $args 1]; set options [lindex $args 1]
} else { } else {
set options "" set options ""
} }
......
...@@ -70,7 +70,7 @@ proc fortran-torture-compile { src option } { ...@@ -70,7 +70,7 @@ proc fortran-torture-compile { src option } {
set options "" set options ""
lappend options "additional_flags=-w $option" lappend options "additional_flags=-w $option"
set comp_output [gfortran_target_compile "$src" "$output" object $options]; set comp_output [gfortran_target_compile "$src" "$output" object $options]
# See if we got something bad. # See if we got something bad.
set fatal_signal "*95*: Internal compiler error: program*got fatal signal" set fatal_signal "*95*: Internal compiler error: program*got fatal signal"
...@@ -139,7 +139,7 @@ proc fortran-torture-execute { src } { ...@@ -139,7 +139,7 @@ proc fortran-torture-execute { src } {
global TORTURE_OPTIONS global TORTURE_OPTIONS
# Check for alternate driver. # Check for alternate driver.
set additional_flags ""; set additional_flags ""
if [file exists [file rootname $src].x] { if [file exists [file rootname $src].x] {
verbose "Using alternate driver [file rootname [file tail $src]].x" 2 verbose "Using alternate driver [file rootname [file tail $src]].x" 2
set done_p 0 set done_p 0
...@@ -186,9 +186,9 @@ proc fortran-torture-execute { src } { ...@@ -186,9 +186,9 @@ proc fortran-torture-execute { src } {
set options "" set options ""
lappend options "additional_flags=-w $option" lappend options "additional_flags=-w $option"
if { $additional_flags != "" } { if { $additional_flags != "" } {
lappend options "additional_flags=$additional_flags"; lappend options "additional_flags=$additional_flags"
} }
set comp_output [gfortran_target_compile "$src" "$executable" executable $options]; set comp_output [gfortran_target_compile "$src" "$executable" executable $options]
# See if we got something bad. # See if we got something bad.
set fatal_signal "*95*: Internal compiler error: program*got fatal signal" set fatal_signal "*95*: Internal compiler error: program*got fatal signal"
...@@ -262,8 +262,8 @@ proc fortran-torture-execute { src } { ...@@ -262,8 +262,8 @@ proc fortran-torture-execute { src } {
# Run the testcase, and analyse the output. # Run the testcase, and analyse the output.
set result [gfortran_load "$executable" "" ""] set result [gfortran_load "$executable" "" ""]
set status [lindex $result 0]; set status [lindex $result 0]
set output [lindex $result 1]; set output [lindex $result 1]
if { $status == "pass" } { if { $status == "pass" } {
remote_file build delete $executable remote_file build delete $executable
} }
...@@ -305,9 +305,9 @@ proc fortran-torture { args } { ...@@ -305,9 +305,9 @@ proc fortran-torture { args } {
global srcdir subdir global srcdir subdir
global compiler_conditional_xfail_data global compiler_conditional_xfail_data
set src [lindex $args 0]; set src [lindex $args 0]
if { [llength $args] > 1 } { if { [llength $args] > 1 } {
set options [lindex $args 1]; set options [lindex $args 1]
} else { } else {
set options "" set options ""
} }
......
...@@ -48,8 +48,8 @@ proc g++_version { } { ...@@ -48,8 +48,8 @@ proc g++_version { } {
# verify that the compiler exists # verify that the compiler exists
if { [is_remote host] || [which $compiler] != 0 } then { if { [is_remote host] || [which $compiler] != 0 } then {
set tmp [remote_exec host "$compiler -v"] set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0]; set status [lindex $tmp 0]
set output [lindex $tmp 1]; set output [lindex $tmp 1]
regexp " version \[^\n\r\]*" $output version regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then { if { $status == 0 && [info exists version] } then {
if [is_remote host] { if [is_remote host] {
...@@ -145,25 +145,25 @@ proc g++_link_flags { paths } { ...@@ -145,25 +145,25 @@ proc g++_link_flags { paths } {
} }
} }
} else { } else {
global tool_root_dir; global tool_root_dir
set libgpp [lookfor_file ${tool_root_dir} libg++]; set libgpp [lookfor_file ${tool_root_dir} libg++]
if { $libgpp != "" } { if { $libgpp != "" } {
append flags "-L${libgpp} "; append flags "-L${libgpp} "
append ld_library_path ":${libgpp}" append ld_library_path ":${libgpp}"
} }
set libstdcpp [lookfor_file ${tool_root_dir} libstdc++]; set libstdcpp [lookfor_file ${tool_root_dir} libstdc++]
if { $libstdcpp != "" } { if { $libstdcpp != "" } {
append flags "-L${libstdcpp} "; append flags "-L${libstdcpp} "
append ld_library_path ":${libstdcpp}" append ld_library_path ":${libstdcpp}"
} }
set libiberty [lookfor_file ${tool_root_dir} libiberty]; set libiberty [lookfor_file ${tool_root_dir} libiberty]
if { $libiberty != "" } { if { $libiberty != "" } {
append flags "-L${libiberty} "; append flags "-L${libiberty} "
} }
set librx [lookfor_file ${tool_root_dir} librx]; set librx [lookfor_file ${tool_root_dir} librx]
if { $librx != "" } { if { $librx != "" } {
append flags "-L${librx} "; append flags "-L${librx} "
} }
} }
...@@ -182,7 +182,7 @@ proc g++_init { args } { ...@@ -182,7 +182,7 @@ proc g++_init { args } {
global base_dir global base_dir
global tmpdir global tmpdir
global libdir global libdir
global gluefile wrap_flags; global gluefile wrap_flags
global objdir srcdir global objdir srcdir
global ALWAYS_CXXFLAGS global ALWAYS_CXXFLAGS
global TOOL_EXECUTABLE TOOL_OPTIONS global TOOL_EXECUTABLE TOOL_OPTIONS
...@@ -196,7 +196,7 @@ proc g++_init { args } { ...@@ -196,7 +196,7 @@ proc g++_init { args } {
if ![info exists GXX_UNDER_TEST] then { if ![info exists GXX_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] { if [info exists TOOL_EXECUTABLE] {
set GXX_UNDER_TEST $TOOL_EXECUTABLE; set GXX_UNDER_TEST $TOOL_EXECUTABLE
} else { } else {
if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } { if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
set GXX_UNDER_TEST [transform c++] set GXX_UNDER_TEST [transform c++]
...@@ -231,16 +231,16 @@ proc g++_init { args } { ...@@ -231,16 +231,16 @@ proc g++_init { args } {
if ![is_remote host] { if ![is_remote host] {
if [info exists TOOL_OPTIONS] { if [info exists TOOL_OPTIONS] {
lappend ALWAYS_CXXFLAGS "additional_flags=[g++_include_flags [get_multilibs ${TOOL_OPTIONS}] ]"; lappend ALWAYS_CXXFLAGS "additional_flags=[g++_include_flags [get_multilibs ${TOOL_OPTIONS}] ]"
lappend ALWAYS_CXXFLAGS "ldflags=[g++_link_flags [get_multilibs ${TOOL_OPTIONS}] ]"; lappend ALWAYS_CXXFLAGS "ldflags=[g++_link_flags [get_multilibs ${TOOL_OPTIONS}] ]"
} else { } else {
lappend ALWAYS_CXXFLAGS "additional_flags=[g++_include_flags [get_multilibs] ]"; lappend ALWAYS_CXXFLAGS "additional_flags=[g++_include_flags [get_multilibs] ]"
lappend ALWAYS_CXXFLAGS "ldflags=[g++_link_flags [get_multilibs] ]"; lappend ALWAYS_CXXFLAGS "ldflags=[g++_link_flags [get_multilibs] ]"
} }
} }
if [info exists TOOL_OPTIONS] { if [info exists TOOL_OPTIONS] {
lappend ALWAYS_CXXFLAGS "additional_flags=$TOOL_OPTIONS"; lappend ALWAYS_CXXFLAGS "additional_flags=$TOOL_OPTIONS"
} }
# Make sure that lines are not wrapped. That can confuse the # Make sure that lines are not wrapped. That can confuse the
...@@ -261,11 +261,11 @@ proc g++_init { args } { ...@@ -261,11 +261,11 @@ proc g++_init { args } {
# #
proc g++_target_compile { source dest type options } { proc g++_target_compile { source dest type options } {
global tmpdir; global tmpdir
global gpp_compile_options global gpp_compile_options
global gluefile wrap_flags global gluefile wrap_flags
global ALWAYS_CXXFLAGS; global ALWAYS_CXXFLAGS
global GXX_UNDER_TEST; global GXX_UNDER_TEST
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}" lappend options "libs=${gluefile}"
...@@ -273,11 +273,11 @@ proc g++_target_compile { source dest type options } { ...@@ -273,11 +273,11 @@ proc g++_target_compile { source dest type options } {
} }
lappend options "additional_flags=[libio_include_flags]" lappend options "additional_flags=[libio_include_flags]"
lappend options "compiler=$GXX_UNDER_TEST"; lappend options "compiler=$GXX_UNDER_TEST"
set options [concat $gpp_compile_options $options] set options [concat $gpp_compile_options $options]
set options [concat "$ALWAYS_CXXFLAGS" $options]; set options [concat "$ALWAYS_CXXFLAGS" $options]
if { [regexp "(^| )-frepo( |$)" $options] && \ if { [regexp "(^| )-frepo( |$)" $options] && \
[regexp "\.o(|bj)$" $dest] } then { [regexp "\.o(|bj)$" $dest] } then {
...@@ -311,7 +311,7 @@ proc ${tool}_option_proc { option } { ...@@ -311,7 +311,7 @@ proc ${tool}_option_proc { option } {
foreach x [split $option ","] { foreach x [split $option ","] {
lappend gpp_compile_options "additional_flags=$x" lappend gpp_compile_options "additional_flags=$x"
} }
return 1; return 1
} else { } else {
return 0 return 0
} }
......
...@@ -103,7 +103,7 @@ proc ${tool}_fail { testcase cflags } { ...@@ -103,7 +103,7 @@ proc ${tool}_fail { testcase cflags } {
proc ${tool}_finish { } { proc ${tool}_finish { } {
# The testing harness apparently requires this. # The testing harness apparently requires this.
global errorInfo; global errorInfo
if [info exists errorInfo] then { if [info exists errorInfo] then {
unset errorInfo unset errorInfo
...@@ -121,11 +121,11 @@ proc ${tool}_finish { } { ...@@ -121,11 +121,11 @@ proc ${tool}_finish { } {
# #
proc ${tool}_exit { } { proc ${tool}_exit { } {
global gluefile; global gluefile
if [info exists gluefile] { if [info exists gluefile] {
file_on_build delete $gluefile; file_on_build delete $gluefile
unset gluefile; unset gluefile
} }
} }
......
...@@ -138,7 +138,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { ...@@ -138,7 +138,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
set output_file "./[file rootname [file tail $prog]].exe" set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was # This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it. # created or not. If it was, dg.exp will try to run it.
remote_file build delete $output_file; remote_file build delete $output_file
} }
default { default {
perror "$do_what: not a valid dg-do keyword" perror "$do_what: not a valid dg-do keyword"
...@@ -150,7 +150,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { ...@@ -150,7 +150,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
lappend options "additional_flags=$extra_tool_flags" lappend options "additional_flags=$extra_tool_flags"
} }
set comp_output [$target_compile "$prog" "$output_file" "$compile_type" $options]; set comp_output [$target_compile "$prog" "$output_file" "$compile_type" $options]
if { $do_what == "repo" } { if { $do_what == "repo" } {
set object_file "$output_file" set object_file "$output_file"
......
...@@ -40,22 +40,22 @@ load_lib gcc-defs.exp ...@@ -40,22 +40,22 @@ load_lib gcc-defs.exp
proc default_gcc_version { } { proc default_gcc_version { } {
global GCC_UNDER_TEST global GCC_UNDER_TEST
gcc_init; gcc_init
# ignore any arguments after the command # ignore any arguments after the command
set compiler [lindex $GCC_UNDER_TEST 0] set compiler [lindex $GCC_UNDER_TEST 0]
if ![is_remote host] { if ![is_remote host] {
set compiler_name [which $compiler]; set compiler_name [which $compiler]
} else { } else {
set compiler_name $compiler; set compiler_name $compiler
} }
# verify that the compiler exists # verify that the compiler exists
if { $compiler_name != 0 } then { if { $compiler_name != 0 } then {
set tmp [remote_exec host "$compiler -v"] set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0]; set status [lindex $tmp 0]
set output [lindex $tmp 1]; set output [lindex $tmp 1]
regexp " version \[^\n\r\]*" $output version regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then { if { $status == 0 && [info exists version] } then {
clone_output "$compiler_name $version\n" clone_output "$compiler_name $version\n"
...@@ -73,7 +73,7 @@ proc default_gcc_version { } { ...@@ -73,7 +73,7 @@ proc default_gcc_version { } {
# #
proc gcc_version { } { proc gcc_version { } {
default_gcc_version; default_gcc_version
} }
# #
...@@ -97,7 +97,7 @@ proc gcc_init { args } { ...@@ -97,7 +97,7 @@ proc gcc_init { args } {
if ![info exists GCC_UNDER_TEST] { if ![info exists GCC_UNDER_TEST] {
if [info exists TOOL_EXECUTABLE] { if [info exists TOOL_EXECUTABLE] {
set GCC_UNDER_TEST $TOOL_EXECUTABLE; set GCC_UNDER_TEST $TOOL_EXECUTABLE
} else { } else {
set GCC_UNDER_TEST "[find_gcc]" set GCC_UNDER_TEST "[find_gcc]"
} }
...@@ -115,8 +115,8 @@ proc gcc_init { args } { ...@@ -115,8 +115,8 @@ proc gcc_init { args } {
# #
proc gcc_target_compile { source dest type options } { proc gcc_target_compile { source dest type options } {
global tmpdir; global tmpdir
global gluefile wrap_flags; global gluefile wrap_flags
global GCC_UNDER_TEST global GCC_UNDER_TEST
global TOOL_OPTIONS global TOOL_OPTIONS
...@@ -139,7 +139,7 @@ proc gcc_target_compile { source dest type options } { ...@@ -139,7 +139,7 @@ proc gcc_target_compile { source dest type options } {
# TOOL_OPTIONS must come first, so that it doesn't override testcase # TOOL_OPTIONS must come first, so that it doesn't override testcase
# specific options. # specific options.
if [info exists TOOL_OPTIONS] { if [info exists TOOL_OPTIONS] {
set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]; set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]
} }
if [target_info exists gcc,timeout] { if [target_info exists gcc,timeout] {
lappend options "timeout=[target_info gcc,timeout]" lappend options "timeout=[target_info gcc,timeout]"
......
...@@ -249,8 +249,8 @@ proc run-gcov { args } { ...@@ -249,8 +249,8 @@ proc run-gcov { args } {
} }
verbose "Running $GCOV $testcase" 2 verbose "Running $GCOV $testcase" 2
set testcase [remote_download host $testcase]; set testcase [remote_download host $testcase]
set result [remote_exec host $GCOV $gcov_args]; set result [remote_exec host $GCOV $gcov_args]
if { [lindex $result 0] != 0 } { if { [lindex $result 0] != 0 } {
fail "$subdir/$testcase gcov failed: [lindex $result 1]" fail "$subdir/$testcase gcov failed: [lindex $result 1]"
clean-gcov $testcase clean-gcov $testcase
...@@ -262,9 +262,9 @@ proc run-gcov { args } { ...@@ -262,9 +262,9 @@ proc run-gcov { args } {
if { $files == "" } { if { $files == "" } {
fail "$subdir/$testcase gcov failed: $testcase.gcov does not exist" fail "$subdir/$testcase gcov failed: $testcase.gcov does not exist"
clean-gcov $testcase clean-gcov $testcase
return; return
} }
remote_upload host $testcase.gcov $testcase.gcov; remote_upload host $testcase.gcov $testcase.gcov
if { $gcov_verify_xfail != "" } { if { $gcov_verify_xfail != "" } {
eval setup_xfail [split $gcov_verify_xfail] eval setup_xfail [split $gcov_verify_xfail]
......
...@@ -49,8 +49,8 @@ proc gfortran_version { } { ...@@ -49,8 +49,8 @@ proc gfortran_version { } {
# verify that the compiler exists # verify that the compiler exists
if { [is_remote host] || [which $compiler] != 0 } then { if { [is_remote host] || [which $compiler] != 0 } then {
set tmp [remote_exec host "$compiler -v"] set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0]; set status [lindex $tmp 0]
set output [lindex $tmp 1]; set output [lindex $tmp 1]
regexp " version \[^\n\r\]*" $output version regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then { if { $status == 0 && [info exists version] } then {
if [is_remote host] { if [is_remote host] {
...@@ -126,7 +126,7 @@ proc gfortran_init { args } { ...@@ -126,7 +126,7 @@ proc gfortran_init { args } {
global base_dir global base_dir
global tmpdir global tmpdir
global libdir global libdir
global gluefile wrap_flags; global gluefile wrap_flags
global objdir srcdir global objdir srcdir
global ALWAYS_GFORTRANFLAGS global ALWAYS_GFORTRANFLAGS
global TOOL_EXECUTABLE TOOL_OPTIONS global TOOL_EXECUTABLE TOOL_OPTIONS
...@@ -139,7 +139,7 @@ proc gfortran_init { args } { ...@@ -139,7 +139,7 @@ proc gfortran_init { args } {
if ![info exists GFORTRAN_UNDER_TEST] then { if ![info exists GFORTRAN_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] { if [info exists TOOL_EXECUTABLE] {
set GFORTRAN_UNDER_TEST $TOOL_EXECUTABLE; set GFORTRAN_UNDER_TEST $TOOL_EXECUTABLE
} else { } else {
if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } { if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
set GFORTRAN_UNDER_TEST [transform gfortran] set GFORTRAN_UNDER_TEST [transform gfortran]
...@@ -169,14 +169,14 @@ proc gfortran_init { args } { ...@@ -169,14 +169,14 @@ proc gfortran_init { args } {
if ![is_remote host] { if ![is_remote host] {
if [info exists TOOL_OPTIONS] { if [info exists TOOL_OPTIONS] {
lappend ALWAYS_GFORTRANFLAGS "ldflags=[gfortran_link_flags [get_multilibs ${TOOL_OPTIONS}] ]"; lappend ALWAYS_GFORTRANFLAGS "ldflags=[gfortran_link_flags [get_multilibs ${TOOL_OPTIONS}] ]"
} else { } else {
lappend ALWAYS_GFORTRANFLAGS "ldflags=[gfortran_link_flags [get_multilibs] ]"; lappend ALWAYS_GFORTRANFLAGS "ldflags=[gfortran_link_flags [get_multilibs] ]"
} }
} }
if [info exists TOOL_OPTIONS] { if [info exists TOOL_OPTIONS] {
lappend ALWAYS_GFORTRANFLAGS "additional_flags=$TOOL_OPTIONS"; lappend ALWAYS_GFORTRANFLAGS "additional_flags=$TOOL_OPTIONS"
} }
verbose -log "ALWAYS_GFORTRANFLAGS set to $ALWAYS_GFORTRANFLAGS" verbose -log "ALWAYS_GFORTRANFLAGS set to $ALWAYS_GFORTRANFLAGS"
...@@ -189,19 +189,19 @@ proc gfortran_init { args } { ...@@ -189,19 +189,19 @@ proc gfortran_init { args } {
# #
proc gfortran_target_compile { source dest type options } { proc gfortran_target_compile { source dest type options } {
global tmpdir; global tmpdir
global gluefile wrap_flags global gluefile wrap_flags
global ALWAYS_GFORTRANFLAGS; global ALWAYS_GFORTRANFLAGS
global GFORTRAN_UNDER_TEST; global GFORTRAN_UNDER_TEST
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}" lappend options "libs=${gluefile}"
lappend options "ldflags=${wrap_flags}" lappend options "ldflags=${wrap_flags}"
} }
lappend options "compiler=$GFORTRAN_UNDER_TEST"; lappend options "compiler=$GFORTRAN_UNDER_TEST"
set options [concat "$ALWAYS_GFORTRANFLAGS" $options]; set options [concat "$ALWAYS_GFORTRANFLAGS" $options]
return [target_compile $source $dest $type $options] return [target_compile $source $dest $type $options]
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
# mike_cleanup -- remove any files that are created by the testcase # mike_cleanup -- remove any files that are created by the testcase
# #
proc mike_cleanup { src_code output_file assembly_file } { proc mike_cleanup { src_code output_file assembly_file } {
remote_file build delete $output_file $assembly_file; remote_file build delete $output_file $assembly_file
} }
# #
...@@ -75,7 +75,7 @@ proc postbase { src_code run groups args } { ...@@ -75,7 +75,7 @@ proc postbase { src_code run groups args } {
} }
if { [llength $args] > 0 } { if { [llength $args] > 0 } {
set comp_options [lindex $args 0]; set comp_options [lindex $args 0]
} else { } else {
set comp_options "" set comp_options ""
} }
...@@ -102,29 +102,29 @@ proc postbase { src_code run groups args } { ...@@ -102,29 +102,29 @@ proc postbase { src_code run groups args } {
case $actions { case $actions {
compile compile
{ {
set compile_type "assembly"; set compile_type "assembly"
set output_file $assembly_file; set output_file $assembly_file
} }
assemble assemble
{ {
set compile_type "object"; set compile_type "object"
append output_file ".o"; append output_file ".o"
} }
link link
{ {
set compile_type "executable"; set compile_type "executable"
append output_file ".exe"; append output_file ".exe"
} }
run run
{ {
set compile_type "executable"; set compile_type "executable"
append output_file ".exe"; append output_file ".exe"
set run yes; set run yes
} }
default default
{ {
set output_file ""; set output_file ""
set compile_type "none"; set compile_type "none"
} }
} }
...@@ -216,12 +216,12 @@ proc postbase { src_code run groups args } { ...@@ -216,12 +216,12 @@ proc postbase { src_code run groups args } {
} }
if [string match $run yes] { if [string match $run yes] {
set result [g++_load $output_file] set result [g++_load $output_file]
set status [lindex $result 0]; set status [lindex $result 0]
set output [lindex $result 1]; set output [lindex $result 1]
if { $status == -1 } { if { $status == -1 } {
mike_cleanup $src_code $output_file $assembly_file; mike_cleanup $src_code $output_file $assembly_file
return; return
} }
if { $verbose > 1 } { if { $verbose > 1 } {
send_user "Checking:\n$program_output\nto see if it matches:\n$output\n\n" send_user "Checking:\n$program_output\nto see if it matches:\n$output\n\n"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
# mike_cleanup -- remove any files that are created by the testcase # mike_cleanup -- remove any files that are created by the testcase
# #
proc mike_cleanup { src_code output_file assembly_file } { proc mike_cleanup { src_code output_file assembly_file } {
remote_file build delete $output_file $assembly_file; remote_file build delete $output_file $assembly_file
} }
# #
...@@ -79,7 +79,7 @@ proc postbase { src_code run groups args } { ...@@ -79,7 +79,7 @@ proc postbase { src_code run groups args } {
} }
if { [llength $args] > 0 } { if { [llength $args] > 0 } {
set comp_options [lindex $args 0]; set comp_options [lindex $args 0]
} else { } else {
set comp_options "" set comp_options ""
} }
...@@ -106,29 +106,29 @@ proc postbase { src_code run groups args } { ...@@ -106,29 +106,29 @@ proc postbase { src_code run groups args } {
case $actions { case $actions {
compile compile
{ {
set compile_type "assembly"; set compile_type "assembly"
set output_file $assembly_file; set output_file $assembly_file
} }
assemble assemble
{ {
set compile_type "object"; set compile_type "object"
append output_file ".o"; append output_file ".o"
} }
link link
{ {
set compile_type "executable"; set compile_type "executable"
append output_file ".exe"; append output_file ".exe"
} }
run run
{ {
set compile_type "executable"; set compile_type "executable"
append output_file ".exe"; append output_file ".exe"
set run yes; set run yes
} }
default default
{ {
set output_file ""; set output_file ""
set compile_type "none"; set compile_type "none"
} }
} }
...@@ -140,7 +140,7 @@ proc postbase { src_code run groups args } { ...@@ -140,7 +140,7 @@ proc postbase { src_code run groups args } {
lappend options "additional_flags=$comp_options" lappend options "additional_flags=$comp_options"
} }
set comp_output [gcc_target_compile $src_file $output_file $compile_type $options]; set comp_output [gcc_target_compile $src_file $output_file $compile_type $options]
set pass no set pass no
...@@ -215,11 +215,11 @@ proc postbase { src_code run groups args } { ...@@ -215,11 +215,11 @@ proc postbase { src_code run groups args } {
} }
if [string match $run yes] { if [string match $run yes] {
set result [gcc_load $output_file] set result [gcc_load $output_file]
set status [lindex $result 0]; set status [lindex $result 0]
set output [lindex $result 1]; set output [lindex $result 1]
if { $status == -1 } { if { $status == -1 } {
mike_cleanup $src_code $output_file $assembly_file; mike_cleanup $src_code $output_file $assembly_file
return; return
} }
if { $verbose > 1 } { if { $verbose > 1 } {
send_user "Checking:\n$program_output\nto see if it matches:\n$output\n\n" send_user "Checking:\n$program_output\nto see if it matches:\n$output\n\n"
......
...@@ -80,7 +80,7 @@ proc objc-torture-compile { src option } { ...@@ -80,7 +80,7 @@ proc objc-torture-compile { src option } {
set options "" set options ""
lappend options "additional_flags=-w $option" lappend options "additional_flags=-w $option"
set comp_output [objc_target_compile "$src" "$output" object $options]; set comp_output [objc_target_compile "$src" "$output" object $options]
objc_check_compile $testcase $option $output $comp_output objc_check_compile $testcase $option $output $comp_output
remote_file build delete $output remote_file build delete $output
} }
...@@ -98,9 +98,9 @@ proc objc-torture-execute { src args } { ...@@ -98,9 +98,9 @@ proc objc-torture-execute { src args } {
global tmpdir tool srcdir output compiler_conditional_xfail_data global tmpdir tool srcdir output compiler_conditional_xfail_data
if { [llength $args] > 0 } { if { [llength $args] > 0 } {
set additional_flags [lindex $args 0]; set additional_flags [lindex $args 0]
} else { } else {
set additional_flags ""; set additional_flags ""
} }
# Check for alternate driver. # Check for alternate driver.
if [file exists [file rootname $src].x] { if [file exists [file rootname $src].x] {
...@@ -132,14 +132,14 @@ proc objc-torture-execute { src args } { ...@@ -132,14 +132,14 @@ proc objc-torture-execute { src args } {
set testcase "[file tail [file dirname $src]]/[file tail $src]" set testcase "[file tail [file dirname $src]]/[file tail $src]"
} }
set count 0; set count 0
set oldstatus "foo"; set oldstatus "foo"
foreach option $option_list { foreach option $option_list {
if { $count > 0 } { if { $count > 0 } {
set oldexec $execname; set oldexec $execname
} }
set execname "${executable}${count}"; set execname "${executable}${count}"
incr count; incr count
# torture_{compile,execute}_xfail are set by the .x script # torture_{compile,execute}_xfail are set by the .x script
# (if present) # (if present)
...@@ -153,15 +153,15 @@ proc objc-torture-execute { src args } { ...@@ -153,15 +153,15 @@ proc objc-torture-execute { src args } {
set ignore_me [eval $torture_eval_before_compile] set ignore_me [eval $torture_eval_before_compile]
} }
remote_file build delete $execname; remote_file build delete $execname
verbose "Testing $testcase, $option" 1 verbose "Testing $testcase, $option" 1
set options "" set options ""
lappend options "additional_flags=-w $option" lappend options "additional_flags=-w $option"
if { $additional_flags != "" } { if { $additional_flags != "" } {
lappend options "additional_flags=$additional_flags"; lappend options "additional_flags=$additional_flags"
} }
set comp_output [objc_target_compile "$src" "${execname}" executable $options]; set comp_output [objc_target_compile "$src" "${execname}" executable $options]
if ![objc_check_compile "$testcase compilation" $option $execname $comp_output] { if ![objc_check_compile "$testcase compilation" $option $execname $comp_output] {
unresolved "$testcase execution, $option" unresolved "$testcase execution, $option"
...@@ -200,26 +200,26 @@ proc objc-torture-execute { src args } { ...@@ -200,26 +200,26 @@ proc objc-torture-execute { src args } {
# Do not do this for native testing since the cost to load/execute # Do not do this for native testing since the cost to load/execute
# the test is fairly small and the comparison step actually slows # the test is fairly small and the comparison step actually slows
# the entire process down because it usually does not "hit". # the entire process down because it usually does not "hit".
set skip 0; set skip 0
if { ![isnative] && [info exists oldexec] } { if { ![isnative] && [info exists oldexec] } {
if { [remote_file build cmp $oldexec $execname] == 0 } { if { [remote_file build cmp $oldexec $execname] == 0 } {
set skip 1; set skip 1
} }
} }
if { $skip == 0 } { if { $skip == 0 } {
set result [objc_load "$execname" "" ""] set result [objc_load "$execname" "" ""]
set status [lindex $result 0]; set status [lindex $result 0]
set output [lindex $result 1]; set output [lindex $result 1]
} }
if { $oldstatus == "pass" } { if { $oldstatus == "pass" } {
remote_file build delete $oldexec; remote_file build delete $oldexec
} }
$status "$testcase execution, $option" $status "$testcase execution, $option"
set oldstatus $status; set oldstatus $status
} }
if [info exists status] { if [info exists status] {
if { $status == "pass" } { if { $status == "pass" } {
remote_file build delete $execname; remote_file build delete $execname
} }
} }
} }
...@@ -253,9 +253,9 @@ proc search_for { file pattern } { ...@@ -253,9 +253,9 @@ proc search_for { file pattern } {
proc objc-torture { args } { proc objc-torture { args } {
global srcdir subdir compiler_conditional_xfail_data global srcdir subdir compiler_conditional_xfail_data
set src [lindex $args 0]; set src [lindex $args 0]
if { [llength $args] > 1 } { if { [llength $args] > 1 } {
set options [lindex $args 1]; set options [lindex $args 1]
} else { } else {
set options "" set options ""
} }
......
...@@ -41,22 +41,22 @@ load_lib target-libpath.exp ...@@ -41,22 +41,22 @@ load_lib target-libpath.exp
proc default_objc_version { } { proc default_objc_version { } {
global OBJC_UNDER_TEST global OBJC_UNDER_TEST
objc_init; objc_init
# ignore any arguments after the command # ignore any arguments after the command
set compiler [lindex $OBJC_UNDER_TEST 0] set compiler [lindex $OBJC_UNDER_TEST 0]
if ![is_remote host] { if ![is_remote host] {
set compiler_name [which $compiler]; set compiler_name [which $compiler]
} else { } else {
set compiler_name $compiler; set compiler_name $compiler
} }
# verify that the compiler exists # verify that the compiler exists
if { $compiler_name != 0 } then { if { $compiler_name != 0 } then {
set tmp [remote_exec host "$compiler -v"] set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0]; set status [lindex $tmp 0]
set output [lindex $tmp 1]; set output [lindex $tmp 1]
regexp " version \[^\n\r\]*" $output version regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then { if { $status == 0 && [info exists version] } then {
clone_output "$compiler_name $version\n" clone_output "$compiler_name $version\n"
...@@ -73,7 +73,7 @@ proc default_objc_version { } { ...@@ -73,7 +73,7 @@ proc default_objc_version { } {
# Call objc_version. We do it this way so we can override it if needed. # Call objc_version. We do it this way so we can override it if needed.
# #
proc objc_version { } { proc objc_version { } {
default_objc_version; default_objc_version
} }
# #
...@@ -103,7 +103,7 @@ proc objc_init { args } { ...@@ -103,7 +103,7 @@ proc objc_init { args } {
if ![info exists OBJC_UNDER_TEST] then { if ![info exists OBJC_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] { if [info exists TOOL_EXECUTABLE] {
set OBJC_UNDER_TEST $TOOL_EXECUTABLE; set OBJC_UNDER_TEST $TOOL_EXECUTABLE
} else { } else {
set OBJC_UNDER_TEST [find_gcc] set OBJC_UNDER_TEST [find_gcc]
} }
...@@ -133,9 +133,9 @@ proc objc_init { args } { ...@@ -133,9 +133,9 @@ proc objc_init { args } {
} }
proc objc_target_compile { source dest type options } { proc objc_target_compile { source dest type options } {
global rootme; global rootme
global tmpdir; global tmpdir
global gluefile wrap_flags; global gluefile wrap_flags
global srcdir global srcdir
global OBJC_UNDER_TEST global OBJC_UNDER_TEST
global TOOL_OPTIONS global TOOL_OPTIONS
...@@ -162,7 +162,7 @@ proc objc_target_compile { source dest type options } { ...@@ -162,7 +162,7 @@ proc objc_target_compile { source dest type options } {
# TOOL_OPTIONS must come first, so that it doesn't override testcase # TOOL_OPTIONS must come first, so that it doesn't override testcase
# specific options. # specific options.
if [info exists TOOL_OPTIONS] { if [info exists TOOL_OPTIONS] {
set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]; set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]
} }
# If we have built libobjc along with the compiler (which usually # If we have built libobjc along with the compiler (which usually
...@@ -227,7 +227,7 @@ proc objc_fail { testcase cflags } { ...@@ -227,7 +227,7 @@ proc objc_fail { testcase cflags } {
proc objc_finish { } { proc objc_finish { } {
# The testing harness apparently requires this. # The testing harness apparently requires this.
global errorInfo; global errorInfo
if [info exists errorInfo] then { if [info exists errorInfo] then {
unset errorInfo unset errorInfo
...@@ -241,11 +241,11 @@ proc objc_finish { } { ...@@ -241,11 +241,11 @@ proc objc_finish { } {
} }
proc objc_exit { } { proc objc_exit { } {
global gluefile; global gluefile
if [info exists gluefile] { if [info exists gluefile] {
file_on_build delete $gluefile; file_on_build delete $gluefile
unset gluefile; unset gluefile
} }
} }
......
...@@ -165,7 +165,7 @@ proc profopt-execute { src } { ...@@ -165,7 +165,7 @@ proc profopt-execute { src } {
set options "" set options ""
lappend options "additional_flags=$option $profile_option" lappend options "additional_flags=$option $profile_option"
set optstr "$option $profile_option" set optstr "$option $profile_option"
set comp_output [${tool}_target_compile "$src" "$execname1" executable $options]; set comp_output [${tool}_target_compile "$src" "$execname1" executable $options]
if ![${tool}_check_compile "$testcase compilation" $optstr $execname1 $comp_output] { if ![${tool}_check_compile "$testcase compilation" $optstr $execname1 $comp_output] {
unresolved "$testcase execution, $optstr" unresolved "$testcase execution, $optstr"
unresolved "$testcase compilation, $option $feedback_option" unresolved "$testcase compilation, $option $feedback_option"
...@@ -204,7 +204,7 @@ proc profopt-execute { src } { ...@@ -204,7 +204,7 @@ proc profopt-execute { src } {
set options "" set options ""
lappend options "additional_flags=$option $feedback_option" lappend options "additional_flags=$option $feedback_option"
set optstr "$option $feedback_option" set optstr "$option $feedback_option"
set comp_output [${tool}_target_compile "$src" "$execname2" "executable" $options]; set comp_output [${tool}_target_compile "$src" "$execname2" "executable" $options]
if ![${tool}_check_compile "$testcase compilation" $optstr $execname2 $comp_output] { if ![${tool}_check_compile "$testcase compilation" $optstr $execname2 $comp_output] {
unresolved "$testcase execution, $optstr" unresolved "$testcase execution, $optstr"
continue continue
...@@ -243,7 +243,7 @@ proc profopt-execute { src } { ...@@ -243,7 +243,7 @@ proc profopt-execute { src } {
set options "" set options ""
lappend options "additional_flags=$option" lappend options "additional_flags=$option"
set optstr "$option" set optstr "$option"
set comp_output [${tool}_target_compile "$src" "$execname3" "executable" $options]; set comp_output [${tool}_target_compile "$src" "$execname3" "executable" $options]
if ![${tool}_check_compile "$testcase compilation" $optstr $execname3 $comp_output] { if ![${tool}_check_compile "$testcase compilation" $optstr $execname3 $comp_output] {
unresolved "$testcase execution, $optstr" unresolved "$testcase execution, $optstr"
unresolved "$testcase perf check, $optstr" unresolved "$testcase perf check, $optstr"
......
...@@ -57,7 +57,7 @@ proc set_ld_library_path_env_vars { } { ...@@ -57,7 +57,7 @@ proc set_ld_library_path_env_vars { } {
} }
if { $orig_environment_saved == 0 } { if { $orig_environment_saved == 0 } {
global env; global env
set orig_environment_saved 1 set orig_environment_saved 1
......
...@@ -310,7 +310,7 @@ proc check_iconv_available { test_what } { ...@@ -310,7 +310,7 @@ proc check_iconv_available { test_what } {
# No error messages, everything is OK. # No error messages, everything is OK.
set result [${tool}_load "./$exe" "" ""] set result [${tool}_load "./$exe" "" ""]
set status [lindex $result 0]; set status [lindex $result 0]
remote_file build delete $exe remote_file build delete $exe
verbose "check_iconv_available status is <$status>" 2 verbose "check_iconv_available status is <$status>" 2
......
...@@ -47,22 +47,22 @@ load_lib target-libpath.exp ...@@ -47,22 +47,22 @@ load_lib target-libpath.exp
proc default_treelang_version { } { proc default_treelang_version { } {
global TREELANG_UNDER_TEST global TREELANG_UNDER_TEST
treelang_init; treelang_init
# ignore any arguments after the command # ignore any arguments after the command
set compiler [lindex $TREELANG_UNDER_TEST 0] set compiler [lindex $TREELANG_UNDER_TEST 0]
if ![is_remote host] { if ![is_remote host] {
set compiler_name [which $compiler]; set compiler_name [which $compiler]
} else { } else {
set compiler_name $compiler; set compiler_name $compiler
} }
# verify that the compiler exists # verify that the compiler exists
if { $compiler_name != 0 } then { if { $compiler_name != 0 } then {
set tmp [remote_exec host "$compiler -v"] set tmp [remote_exec host "$compiler -v"]
set status [lindex $tmp 0]; set status [lindex $tmp 0]
set output [lindex $tmp 1]; set output [lindex $tmp 1]
regexp " version \[^\n\r\]*" $output version regexp " version \[^\n\r\]*" $output version
if { $status == 0 && [info exists version] } then { if { $status == 0 && [info exists version] } then {
clone_output "$compiler_name $version\n" clone_output "$compiler_name $version\n"
...@@ -103,7 +103,7 @@ proc treelang_init { args } { ...@@ -103,7 +103,7 @@ proc treelang_init { args } {
if ![info exists TREELANG_UNDER_TEST] then { if ![info exists TREELANG_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] { if [info exists TOOL_EXECUTABLE] {
set TREELANG_UNDER_TEST $TOOL_EXECUTABLE; set TREELANG_UNDER_TEST $TOOL_EXECUTABLE
} else { } else {
set TREELANG_UNDER_TEST [find_gcc] set TREELANG_UNDER_TEST [find_gcc]
} }
...@@ -133,9 +133,9 @@ proc treelang_init { args } { ...@@ -133,9 +133,9 @@ proc treelang_init { args } {
} }
proc treelang_target_compile { source dest type options } { proc treelang_target_compile { source dest type options } {
global rootme; global rootme
global tmpdir; global tmpdir
global gluefile wrap_flags; global gluefile wrap_flags
global srcdir global srcdir
global TREELANG_UNDER_TEST global TREELANG_UNDER_TEST
global TOOL_OPTIONS global TOOL_OPTIONS
...@@ -153,7 +153,7 @@ proc treelang_target_compile { source dest type options } { ...@@ -153,7 +153,7 @@ proc treelang_target_compile { source dest type options } {
# TOOL_OPTIONS must come first, so that it doesn't override testcase # TOOL_OPTIONS must come first, so that it doesn't override testcase
# specific options. # specific options.
if [info exists TOOL_OPTIONS] { if [info exists TOOL_OPTIONS] {
set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]; set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]
} }
# If we have built libtreelang along with the compiler (which usually # If we have built libtreelang along with the compiler (which usually
...@@ -197,7 +197,7 @@ proc treelang_fail { testcase cflags } { ...@@ -197,7 +197,7 @@ proc treelang_fail { testcase cflags } {
proc treelang_finish { } { proc treelang_finish { } {
# The testing harness apparently requires this. # The testing harness apparently requires this.
global errorInfo; global errorInfo
if [info exists errorInfo] then { if [info exists errorInfo] then {
unset errorInfo unset errorInfo
...@@ -211,11 +211,11 @@ proc treelang_finish { } { ...@@ -211,11 +211,11 @@ proc treelang_finish { } {
} }
proc treelang_exit { } { proc treelang_exit { } {
global gluefile; global gluefile
if [info exists gluefile] { if [info exists gluefile] {
file_on_build delete $gluefile; file_on_build delete $gluefile
unset gluefile; unset gluefile
} }
} }
......
...@@ -30,11 +30,11 @@ proc ${tool}_maybe_build_wrapper { filename } { ...@@ -30,11 +30,11 @@ proc ${tool}_maybe_build_wrapper { filename } {
# that gcc objects on may change, so just make sure -w is always # that gcc objects on may change, so just make sure -w is always
# passed to turn off all warnings. # passed to turn off all warnings.
set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags -w" set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags -w"
set result [build_wrapper $filename]; set result [build_wrapper $filename]
set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags" set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags"
if { $result != "" } { if { $result != "" } {
set gluefile [lindex $result 0]; set gluefile [lindex $result 0]
set wrap_flags [lindex $result 1]; set wrap_flags [lindex $result 1]
} else { } else {
unset gluefile unset gluefile
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment