Some functionality is available on RHEL-5.4+ only with gfortran44 as the default gfortran binary is from gcc-4.1. --- ./gdb/testsuite/gdb.fortran/common-block.exp 2009-12-15 05:13:56.000000000 +0100 +++ ./gdb/testsuite/gdb.fortran/common-block.exp 2009-12-15 05:21:00.000000000 +0100 @@ -20,7 +20,25 @@ set testfile "common-block" set srcfile ${testfile}.f90 set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { +# Temporarily provide f77compiler=gfortran44 saving the original value around. + +set board [target_info name] +if [board_info $board exists f77compiler] { + set old_f77compiler [board_info $board f77compiler] + unset_board_info f77compiler +} elseif [info exists old_f77compiler] { + unset old_f77compiler +} +set_board_info f77compiler gfortran44 + +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] + +unset_board_info f77compiler +if [info exists old_f77compiler] { + set_board_info f77compiler $old_f77compiler +} + +if { $err != "" } { untested "Couldn't compile ${srcfile}" return -1 } --- ./gdb/testsuite/gdb.fortran/dwarf-stride.exp 2009-12-15 05:13:56.000000000 +0100 +++ ./gdb/testsuite/gdb.fortran/dwarf-stride.exp 2009-12-15 05:20:07.000000000 +0100 @@ -27,7 +27,25 @@ set testfile dwarf-stride set srcfile ${testfile}.f90 -if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] } { +# Temporarily provide f77compiler=gfortran44 saving the original value around. + +set board [target_info name] +if [board_info $board exists f77compiler] { + set old_f77compiler [board_info $board f77compiler] + unset_board_info f77compiler +} elseif [info exists old_f77compiler] { + unset old_f77compiler +} +set_board_info f77compiler gfortran44 + +set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] + +unset_board_info f77compiler +if [info exists old_f77compiler] { + set_board_info f77compiler $old_f77compiler +} + +if $err { return -1 } --- ./gdb/testsuite/gdb.fortran/dynamic.exp 2009-12-15 05:13:56.000000000 +0100 +++ ./gdb/testsuite/gdb.fortran/dynamic.exp 2009-12-15 05:17:21.000000000 +0100 @@ -25,7 +25,25 @@ set testfile "dynamic" set srcfile ${testfile}.f90 set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { +# Temporarily provide f77compiler=gfortran44 saving the original value around. + +set board [target_info name] +if [board_info $board exists f77compiler] { + set old_f77compiler [board_info $board f77compiler] + unset_board_info f77compiler +} elseif [info exists old_f77compiler] { + unset old_f77compiler +} +set_board_info f77compiler gfortran44 + +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] + +unset_board_info f77compiler +if [info exists old_f77compiler] { + set_board_info f77compiler $old_f77compiler +} + +if { $err != "" } { untested "Couldn't compile ${srcfile}" return -1 } --- ./gdb/testsuite/gdb.fortran/library-module.exp 2009-12-15 05:13:56.000000000 +0100 +++ ./gdb/testsuite/gdb.fortran/library-module.exp 2009-12-15 05:22:37.000000000 +0100 @@ -25,16 +25,34 @@ if [get_compiler_info not-used] { return -1 } -if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}] != "" } { - untested "Couldn't compile ${srclibfile}" - return -1 +# Temporarily provide f77compiler=gfortran44 saving the original value around. + +set board [target_info name] +if [board_info $board exists f77compiler] { + set old_f77compiler [board_info $board f77compiler] + unset_board_info f77compiler +} elseif [info exists old_f77compiler] { + unset old_f77compiler } +set_board_info f77compiler gfortran44 # prepare_for_testing cannot be used as linking with $libfile cannot be passed # just for the linking phase (and not the source compilation phase). And any # warnings on ignored $libfile abort the process. -if { [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}] != "" } { +set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}] +set err2 [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}] + +unset_board_info f77compiler +if [info exists old_f77compiler] { + set_board_info f77compiler $old_f77compiler +} + +if { $err1 != "" } { + untested "Couldn't compile ${srclibfile}" + return -1 +} +if { $err2 != "" } { untested "Couldn't compile ${srcfile}" return -1 } --- ./gdb/testsuite/gdb.fortran/module.exp 2009-12-15 05:13:56.000000000 +0100 +++ ./gdb/testsuite/gdb.fortran/module.exp 2009-12-15 05:28:49.000000000 +0100 @@ -16,7 +16,25 @@ set testfile "module" set srcfile ${testfile}.f90 -if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } { +# Temporarily provide f77compiler=gfortran44 saving the original value around. + +set board [target_info name] +if [board_info $board exists f77compiler] { + set old_f77compiler [board_info $board f77compiler] + unset_board_info f77compiler +} elseif [info exists old_f77compiler] { + unset old_f77compiler +} +set_board_info f77compiler gfortran44 + +set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] + +unset_board_info f77compiler +if [info exists old_f77compiler] { + set_board_info f77compiler $old_f77compiler +} + +if $err { return -1 } --- ./gdb/testsuite/gdb.fortran/string.exp 2009-12-15 05:13:56.000000000 +0100 +++ ./gdb/testsuite/gdb.fortran/string.exp 2009-12-15 05:18:13.000000000 +0100 @@ -23,7 +23,25 @@ set testfile "string" set srcfile ${testfile}.f90 set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { +# Temporarily provide f77compiler=gfortran44 saving the original value around. + +set board [target_info name] +if [board_info $board exists f77compiler] { + set old_f77compiler [board_info $board f77compiler] + unset_board_info f77compiler +} elseif [info exists old_f77compiler] { + unset old_f77compiler +} +set_board_info f77compiler gfortran44 + +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] + +unset_board_info f77compiler +if [info exists old_f77compiler] { + set_board_info f77compiler $old_f77compiler +} + +if { $err != "" } { untested "Couldn't compile ${srcfile}" return -1 }