406 lines
14 KiB
Diff
406 lines
14 KiB
Diff
|
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
|
||
|
the default gcc and gfortran binaries are from gcc-4.1.
|
||
|
|
||
|
--- gdb-7.0/gdb/testsuite/gdb.base/vla.exp-orig 2009-12-20 00:38:13.000000000 +0100
|
||
|
+++ gdb-7.0/gdb/testsuite/gdb.base/vla.exp 2009-12-20 00:54:19.000000000 +0100
|
||
|
@@ -16,7 +16,25 @@
|
||
|
set testfile vla
|
||
|
set srcfile ${testfile}.c
|
||
|
set binfile ${objdir}/${subdir}/${testfile}
|
||
|
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||
|
+# Temporarily provide compiler=gcc44 saving the original value around.
|
||
|
+
|
||
|
+set board [target_info name]
|
||
|
+if [board_info $board exists compiler] {
|
||
|
+ set old_compiler [board_info $board compiler]
|
||
|
+ unset_board_info compiler
|
||
|
+} elseif [info exists old_compiler] {
|
||
|
+ unset old_compiler
|
||
|
+}
|
||
|
+set_board_info compiler gcc44
|
||
|
+
|
||
|
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug quiet}]
|
||
|
+
|
||
|
+unset_board_info compiler
|
||
|
+if [info exists old_compiler] {
|
||
|
+ set_board_info compiler $old_compiler
|
||
|
+}
|
||
|
+
|
||
|
+if { $err != "" } {
|
||
|
untested "Couldn't compile test program"
|
||
|
return -1
|
||
|
}
|
||
|
--- gdb-7.0/gdb/testsuite/gdb.base/break-interp.exp-orig 2009-12-20 00:38:13.000000000 +0100
|
||
|
+++ gdb-7.0/gdb/testsuite/gdb.base/break-interp.exp 2009-12-20 01:11:47.000000000 +0100
|
||
|
@@ -31,10 +31,30 @@ if [get_compiler_info ${binfile_lib}] {
|
||
|
return -1
|
||
|
}
|
||
|
|
||
|
+# Temporarily provide compiler=gcc44 saving the original value around.
|
||
|
+# RHEL-5 workaround of its:
|
||
|
+# gcc: -soname: linker input file unused because linking not done
|
||
|
+
|
||
|
+set board [target_info name]
|
||
|
+if [board_info $board exists compiler] {
|
||
|
+ set old_compiler [board_info $board compiler]
|
||
|
+ unset_board_info compiler
|
||
|
+} elseif [info exists old_compiler] {
|
||
|
+ unset old_compiler
|
||
|
+}
|
||
|
+set_board_info compiler gcc44
|
||
|
+
|
||
|
# Use -soname so that it is listed with " => " by ldd and this testcase makes
|
||
|
# a copy of ${binfile_lib} for each prelink variant.
|
||
|
|
||
|
-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug additional_flags=-Wl,-soname,${test}.so]] != ""} {
|
||
|
+set err [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug additional_flags=-Wl,-soname,${test}.so]]
|
||
|
+
|
||
|
+unset_board_info compiler
|
||
|
+if [info exists old_compiler] {
|
||
|
+ set_board_info compiler $old_compiler
|
||
|
+}
|
||
|
+
|
||
|
+if { $err != "" } {
|
||
|
return -1
|
||
|
}
|
||
|
|
||
|
@@ -483,9 +503,33 @@ foreach ldprelink {NO YES} {
|
||
|
if {$binpie == "YES"} {
|
||
|
lappend opts {additional_flags=-fPIE -pie}
|
||
|
}
|
||
|
- if {[build_executable ${test}.exp [file tail $exec] $srcfile $opts] == -1} {
|
||
|
- continue;
|
||
|
+
|
||
|
+
|
||
|
+ # Temporarily provide compiler=gcc44 saving the original value around.
|
||
|
+ # RHEL-5 workaround of its:
|
||
|
+ # gcc: -rpath: linker input file unused because linking not done
|
||
|
+ # gcc: --dynamic-linker: linker input file unused because linking not done
|
||
|
+
|
||
|
+ set board [target_info name]
|
||
|
+ if [board_info $board exists compiler] {
|
||
|
+ set old_compiler [board_info $board compiler]
|
||
|
+ unset_board_info compiler
|
||
|
+ } elseif [info exists old_compiler] {
|
||
|
+ unset old_compiler
|
||
|
+ }
|
||
|
+ set_board_info compiler gcc44
|
||
|
+
|
||
|
+ set err [build_executable ${test}.exp [file tail $exec] $srcfile $opts]
|
||
|
+
|
||
|
+ unset_board_info compiler
|
||
|
+ if [info exists old_compiler] {
|
||
|
+ set_board_info compiler $old_compiler
|
||
|
}
|
||
|
+
|
||
|
+ if { $err == -1 } {
|
||
|
+ continue
|
||
|
+ }
|
||
|
+
|
||
|
if {$binsepdebug == "SEP"} {
|
||
|
gdb_gnu_strip_debug $exec
|
||
|
# Just a sanity check. As gdb_gnu_strip_debug uses the
|
||
|
--- ./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
|
||
|
}
|
||
|
--- gdb-7.0/gdb/testsuite/gdb.fortran/omp-step.exp-orig 2009-12-20 09:47:04.000000000 +0100
|
||
|
+++ gdb-7.0/gdb/testsuite/gdb.fortran/omp-step.exp 2009-12-20 09:50:06.000000000 +0100
|
||
|
@@ -15,7 +15,26 @@
|
||
|
|
||
|
set testfile "omp-step"
|
||
|
set srcfile ${testfile}.f90
|
||
|
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77 additional_flags=-fopenmp}] } {
|
||
|
+
|
||
|
+# 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 additional_flags=-fopenmp}]
|
||
|
+
|
||
|
+unset_board_info f77compiler
|
||
|
+if [info exists old_f77compiler] {
|
||
|
+ set_board_info f77compiler $old_f77compiler
|
||
|
+}
|
||
|
+
|
||
|
+if $err {
|
||
|
return -1
|
||
|
}
|
||
|
|
||
|
--- ./gdb/testsuite/gdb.fortran/derived-type.exp 2009-01-07 13:39:13.000000000 +0100
|
||
|
+++ ./gdb/testsuite/gdb.fortran/derived-type.exp 2009-12-20 12:37:12.000000000 +0100
|
||
|
@@ -26,7 +26,25 @@ set testfile "derived-type"
|
||
|
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/subarray.exp 2009-01-07 13:39:13.000000000 +0100
|
||
|
+++ ./gdb/testsuite/gdb.fortran/subarray.exp 2009-12-20 12:38:00.000000000 +0100
|
||
|
@@ -26,7 +26,25 @@ set testfile "subarray"
|
||
|
set srcfile ${testfile}.f
|
||
|
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.threads/tls-sepdebug.exp 2009-12-20 12:22:18.000000000 +0100
|
||
|
+++ ./gdb/testsuite/gdb.threads/tls-sepdebug.exp 2009-12-20 12:39:53.000000000 +0100
|
||
|
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
|
||
|
|
||
|
# FIXME: gcc dependency (-Wl,-soname).
|
||
|
|
||
|
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
|
||
|
+# Temporarily provide compiler=gcc44 saving the original value around.
|
||
|
+
|
||
|
+set board [target_info name]
|
||
|
+if [board_info $board exists compiler] {
|
||
|
+ set old_compiler [board_info $board compiler]
|
||
|
+ unset_board_info compiler
|
||
|
+} elseif [info exists old_compiler] {
|
||
|
+ unset old_compiler
|
||
|
+}
|
||
|
+set_board_info compiler gcc44
|
||
|
+
|
||
|
+set err [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]]
|
||
|
+
|
||
|
+unset_board_info compiler
|
||
|
+if [info exists old_compiler] {
|
||
|
+ set_board_info compiler $old_compiler
|
||
|
+}
|
||
|
+
|
||
|
+if { $err != "" } {
|
||
|
untested "Couldn't compile test library"
|
||
|
return -1
|
||
|
}
|