0911f37
Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
0911f37
the default gcc and gfortran binaries are from gcc-4.1.
0911f37
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/vla.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.base/vla.exp	2011-12-18 23:35:23.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/vla.exp	2011-12-19 02:27:16.745327844 +0100
0911f37
@@ -16,7 +16,25 @@
0911f37
 set testfile vla
0911f37
 set srcfile ${testfile}.c
0911f37
 set binfile ${objdir}/${subdir}/${testfile}
0911f37
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
0911f37
+# Temporarily provide compiler=gcc44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
0911f37
+if [board_info $board exists compiler] {
0911f37
+    set old_compiler [board_info $board compiler]
0911f37
+    unset_board_info compiler
0911f37
+} elseif [info exists old_compiler] {
0911f37
+    unset old_compiler
0911f37
+}
0911f37
+set_board_info compiler gcc44
0911f37
+
0911f37
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug quiet}]
0911f37
+
0911f37
+unset_board_info compiler
0911f37
+if [info exists old_compiler] {
0911f37
+    set_board_info compiler $old_compiler
0911f37
+}
0911f37
+
0911f37
+if  { $err != "" } {
0911f37
     untested "Couldn't compile test program"
0911f37
     return -1
0911f37
 }
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.base/break-interp.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.base/break-interp.exp	2011-12-19 02:21:56.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.base/break-interp.exp	2011-12-19 02:27:16.745327844 +0100
Jan Kratochvil 254f0e9
@@ -34,9 +34,29 @@ if [get_compiler_info ${binfile_lib}] {
0911f37
     return -1
0911f37
 }
0911f37
 
0911f37
+# Temporarily provide compiler=gcc44 saving the original value around.
0911f37
+# RHEL-5 workaround of its:
0911f37
+#   gcc: -soname: linker input file unused because linking not done
0911f37
+
0911f37
+set board [target_info name]
0911f37
+if [board_info $board exists compiler] {
0911f37
+    set old_compiler [board_info $board compiler]
0911f37
+    unset_board_info compiler
0911f37
+} elseif [info exists old_compiler] {
0911f37
+    unset old_compiler
0911f37
+}
0911f37
+set_board_info compiler gcc44
0911f37
+
dd46ae6
 # Use -soname so that the new library gets copied by build_executable_own_libs.
0911f37
 
Jan Kratochvil e00e5ea
-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} {
Jan Kratochvil e00e5ea
+set err [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]]
0911f37
+
0911f37
+unset_board_info compiler
0911f37
+if [info exists old_compiler] {
0911f37
+    set_board_info compiler $old_compiler
0911f37
+}
0911f37
+
0911f37
+if { $err != "" } {
0911f37
     return -1
0911f37
 }
0911f37
 
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/common-block.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/common-block.exp	2011-12-19 01:31:24.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/common-block.exp	2011-12-19 02:27:16.746327840 +0100
0911f37
@@ -20,7 +20,25 @@ set testfile "common-block"
0911f37
 set srcfile ${testfile}.f90
0911f37
 set binfile ${objdir}/${subdir}/${testfile}
0911f37
 
Jan Kratochvil 3b55f78
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+}
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
Jan Kratochvil 3b55f78
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if  { $err != "" } {
0911f37
     untested "Couldn't compile ${srcfile}"
0911f37
     return -1
0911f37
 }
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dwarf-stride.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp	2011-12-18 23:35:23.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dwarf-stride.exp	2011-12-19 02:27:16.746327840 +0100
0911f37
@@ -27,7 +27,25 @@
0911f37
 set testfile dwarf-stride
0911f37
 set srcfile ${testfile}.f90
0911f37
 
Jan Kratochvil 3b55f78
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler 
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+} 
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
Jan Kratochvil 3b55f78
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if $err {
0911f37
     return -1
0911f37
 }
0911f37
 
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dynamic.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/dynamic.exp	2011-12-18 23:35:23.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/dynamic.exp	2011-12-19 02:27:16.746327840 +0100
0911f37
@@ -25,7 +25,25 @@ set testfile "dynamic"
0911f37
 set srcfile ${testfile}.f90
0911f37
 set binfile ${objdir}/${subdir}/${testfile}
0911f37
 
Jan Kratochvil 3b55f78
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+}
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
Jan Kratochvil 3b55f78
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if  { $err != "" } {
0911f37
     untested "Couldn't compile ${srcfile}"
0911f37
     return -1
0911f37
 }
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/library-module.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/library-module.exp	2011-11-30 09:24:32.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/library-module.exp	2011-12-19 02:31:10.991318026 +0100
0911f37
@@ -25,16 +25,34 @@ if [get_compiler_info not-used] {
0911f37
    return -1
0911f37
 }
0911f37
 
Jan Kratochvil 3b55f78
-if  { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f90}] != "" } {
0911f37
-    untested "Couldn't compile ${srclibfile}"
0911f37
-    return -1
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
 }
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
 
0911f37
 # prepare_for_testing cannot be used as linking with $libfile cannot be passed
0911f37
 # just for the linking phase (and not the source compilation phase).  And any
0911f37
 # warnings on ignored $libfile abort the process.
0911f37
 
Jan Kratochvil 254f0e9
-if  { [gdb_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug f90 shlib=$objdir/$subdir/$libfile]] != "" } {
Jan Kratochvil 3b55f78
+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f90}]
Jan Kratochvil 254f0e9
+set err2 [gdb_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable [list debug f90 shlib=$objdir/$subdir/$libfile]]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if  { $err1 != "" } {
0911f37
+    untested "Couldn't compile ${srclibfile}"
0911f37
+    return -1
0911f37
+}
0911f37
+if  { $err2 != "" } {
0911f37
     untested "Couldn't compile ${srcfile}"
0911f37
     return -1
0911f37
 }
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/module.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/module.exp	2011-06-30 00:05:16.000000000 +0200
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/module.exp	2011-12-19 02:27:16.747327836 +0100
0911f37
@@ -16,7 +16,25 @@
0911f37
 set testfile "module"
0911f37
 set srcfile ${testfile}.f90
0911f37
 
Jan Kratochvil 3b55f78
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+}
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
Jan Kratochvil 3b55f78
+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if $err {
0911f37
     return -1
0911f37
 }
0911f37
 
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/string.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/string.exp	2011-12-18 23:35:23.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/string.exp	2011-12-19 02:27:16.747327836 +0100
0911f37
@@ -23,7 +23,25 @@ set testfile "string"
0911f37
 set srcfile ${testfile}.f90
0911f37
 set binfile ${objdir}/${subdir}/${testfile}
0911f37
 
Jan Kratochvil 3b55f78
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+}
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
Jan Kratochvil 3b55f78
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if { $err != "" } {
0911f37
     untested "Couldn't compile ${srcfile}"
0911f37
     return -1
0911f37
 }
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/omp-step.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/omp-step.exp	2011-12-19 01:31:24.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/omp-step.exp	2011-12-19 02:27:16.748327832 +0100
0911f37
@@ -15,7 +15,26 @@
0911f37
 
0911f37
 set testfile "omp-step"
0911f37
 set srcfile ${testfile}.f90
Jan Kratochvil 3b55f78
-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
0911f37
+
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler 
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+} 
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
Jan Kratochvil 3b55f78
+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90 additional_flags=-fopenmp}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if $err {
0911f37
     return -1
0911f37
 }
0911f37
 
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/derived-type.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/derived-type.exp	2011-06-29 19:50:47.000000000 +0200
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/derived-type.exp	2011-12-19 02:27:16.748327832 +0100
8c4c91e
@@ -28,8 +28,26 @@ set testfile "derived-type"
0911f37
 set srcfile ${testfile}.f90
0911f37
 set binfile ${objdir}/${subdir}/${testfile}
0911f37
 
8c4c91e
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
Jan Kratochvil 3b55f78
-	 executable {debug f90}] != ""} {
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+}
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
8c4c91e
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
Jan Kratochvil 3b55f78
+	 executable {debug f90}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if { $err != "" } {
0911f37
     return -1
0911f37
 }
8c4c91e
 
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/subarray.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.fortran/subarray.exp	2011-06-29 19:50:47.000000000 +0200
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.fortran/subarray.exp	2011-12-19 02:27:16.748327832 +0100
8c4c91e
@@ -28,8 +28,26 @@ set testfile "subarray"
0911f37
 set srcfile ${testfile}.f
0911f37
 set binfile ${objdir}/${subdir}/${testfile}
0911f37
 
8c4c91e
-if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
Jan Kratochvil 3b55f78
-	executable {debug f90}] != ""} {
Jan Kratochvil 3b55f78
+# Temporarily provide f90compiler=gfortran44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
Jan Kratochvil 3b55f78
+if [board_info $board exists f90compiler] {
Jan Kratochvil 3b55f78
+    set old_f90compiler [board_info $board f90compiler]
Jan Kratochvil 3b55f78
+    unset_board_info f90compiler
Jan Kratochvil 3b55f78
+} elseif [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    unset old_f90compiler
0911f37
+}
Jan Kratochvil 3b55f78
+set_board_info f90compiler gfortran44
0911f37
+
8c4c91e
+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
Jan Kratochvil 3b55f78
+	executable {debug f90}]
0911f37
+
Jan Kratochvil 3b55f78
+unset_board_info f90compiler
Jan Kratochvil 3b55f78
+if [info exists old_f90compiler] {
Jan Kratochvil 3b55f78
+    set_board_info f90compiler $old_f90compiler
0911f37
+}
0911f37
+
0911f37
+if { $err != "" } {
0911f37
     return -1
0911f37
 }
8c4c91e
 
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/tls-sepdebug.exp
8c4c91e
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp	2011-12-19 00:28:11.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/gdb.threads/tls-sepdebug.exp	2011-12-19 02:27:16.748327832 +0100
0911f37
@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
0911f37
 
0911f37
 # FIXME: gcc dependency (-Wl,-soname).
0911f37
 
0911f37
-if  { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
0911f37
+# Temporarily provide compiler=gcc44 saving the original value around.
0911f37
+
0911f37
+set board [target_info name]
0911f37
+if [board_info $board exists compiler] {
0911f37
+    set old_compiler [board_info $board compiler]
0911f37
+    unset_board_info compiler
0911f37
+} elseif [info exists old_compiler] {
0911f37
+    unset old_compiler
0911f37
+}
0911f37
+set_board_info compiler gcc44
0911f37
+
0911f37
+set err [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]]
0911f37
+
0911f37
+unset_board_info compiler
0911f37
+if [info exists old_compiler] {
0911f37
+    set_board_info compiler $old_compiler
0911f37
+}
0911f37
+
0911f37
+if { $err != "" } {
0911f37
     untested "Couldn't compile test library"
0911f37
     return -1
0911f37
 }
Jan Kratochvil 254f0e9
Index: gdb-7.4.50.20111218/gdb/testsuite/lib/prelink-support.exp
dd46ae6
===================================================================
Jan Kratochvil 254f0e9
--- gdb-7.4.50.20111218.orig/gdb/testsuite/lib/prelink-support.exp	2011-12-19 02:21:56.000000000 +0100
Jan Kratochvil 254f0e9
+++ gdb-7.4.50.20111218/gdb/testsuite/lib/prelink-support.exp	2011-12-19 02:27:16.749327828 +0100
Jan Kratochvil 254f0e9
@@ -119,9 +119,31 @@ proc file_copy {src dest} {
dd46ae6
 proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
dd46ae6
     global objdir subdir
dd46ae6
 
dd46ae6
-    if {[build_executable $testname $executable $sources $options] == -1} {
dd46ae6
-	return ""
dd46ae6
+    # Temporarily provide compiler=gcc44 saving the original value around.
dd46ae6
+    # RHEL-5 workaround of its:
dd46ae6
+    #   gcc: -rpath: linker input file unused because linking not done
dd46ae6
+    #   gcc: --dynamic-linker: linker input file unused because linking not done
dd46ae6
+
dd46ae6
+    set board [target_info name]
dd46ae6
+    if [board_info $board exists compiler] {
dd46ae6
+	set old_compiler [board_info $board compiler]
dd46ae6
+	unset_board_info compiler
dd46ae6
+    } elseif [info exists old_compiler] {
dd46ae6
+	unset old_compiler
Jan Kratochvil 254f0e9
+    }
dd46ae6
+    set_board_info compiler gcc44
dd46ae6
+
dd46ae6
+    set err [build_executable $testname $executable $sources $options]
dd46ae6
+
dd46ae6
+    unset_board_info compiler
dd46ae6
+    if [info exists old_compiler] {
dd46ae6
+	set_board_info compiler $old_compiler
Jan Kratochvil 254f0e9
     }
dd46ae6
+
dd46ae6
+    if { $err == -1 } {
dd46ae6
+	return ""   
dd46ae6
+    }
dd46ae6
+
dd46ae6
     set binfile ${objdir}/${subdir}/${executable}
dd46ae6
 
dd46ae6
     set command "ldd $binfile"