]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-rhel5-gcc44.patch
cleanup adapter's noise.
[packages/gdb.git] / gdb-rhel5-gcc44.patch
CommitLineData
6ed6bacf
AM
1Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as
2the default gcc and gfortran binaries are from gcc-4.1.
3
a7de96f0 4Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/vla.exp
6ed6bacf 5===================================================================
a7de96f0
PS
6--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.base/vla.exp 2012-07-03 17:30:07.000000000 +0200
7+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/vla.exp 2012-07-03 17:50:57.999207540 +0200
6ed6bacf
AM
8@@ -16,7 +16,25 @@
9 set testfile vla
10 set srcfile ${testfile}.c
11 set binfile ${objdir}/${subdir}/${testfile}
12-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
13+# Temporarily provide compiler=gcc44 saving the original value around.
14+
15+set board [target_info name]
16+if [board_info $board exists compiler] {
17+ set old_compiler [board_info $board compiler]
18+ unset_board_info compiler
19+} elseif [info exists old_compiler] {
20+ unset old_compiler
21+}
22+set_board_info compiler gcc44
23+
24+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug quiet}]
25+
26+unset_board_info compiler
27+if [info exists old_compiler] {
28+ set_board_info compiler $old_compiler
29+}
30+
31+if { $err != "" } {
32 untested "Couldn't compile test program"
33 return -1
34 }
a7de96f0 35Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.base/break-interp.exp
6ed6bacf 36===================================================================
a7de96f0
PS
37--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.base/break-interp.exp 2012-07-03 17:44:45.000000000 +0200
38+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.base/break-interp.exp 2012-07-03 17:50:58.000207539 +0200
39@@ -34,9 +34,29 @@ if [get_compiler_info] {
6ed6bacf
AM
40 return -1
41 }
42
43+# Temporarily provide compiler=gcc44 saving the original value around.
44+# RHEL-5 workaround of its:
45+# gcc: -soname: linker input file unused because linking not done
46+
47+set board [target_info name]
48+if [board_info $board exists compiler] {
49+ set old_compiler [board_info $board compiler]
50+ unset_board_info compiler
51+} elseif [info exists old_compiler] {
52+ unset old_compiler
53+}
54+set_board_info compiler gcc44
55+
56 # Use -soname so that the new library gets copied by build_executable_own_libs.
57
58-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} {
59+set err [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]]
60+
61+unset_board_info compiler
62+if [info exists old_compiler] {
63+ set_board_info compiler $old_compiler
64+}
65+
66+if { $err != "" } {
67 return -1
68 }
69
a7de96f0 70Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/common-block.exp
6ed6bacf 71===================================================================
a7de96f0
PS
72--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/common-block.exp 2012-07-03 17:36:21.000000000 +0200
73+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/common-block.exp 2012-07-03 17:50:58.001207537 +0200
6ed6bacf
AM
74@@ -20,7 +20,25 @@ set testfile "common-block"
75 set srcfile ${testfile}.f90
76 set binfile ${objdir}/${subdir}/${testfile}
77
f412e1b4
PS
78-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
79+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
80+
81+set board [target_info name]
f412e1b4
PS
82+if [board_info $board exists f90compiler] {
83+ set old_f90compiler [board_info $board f90compiler]
84+ unset_board_info f90compiler
85+} elseif [info exists old_f90compiler] {
86+ unset old_f90compiler
6ed6bacf 87+}
f412e1b4 88+set_board_info f90compiler gfortran44
6ed6bacf 89+
f412e1b4 90+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
6ed6bacf 91+
f412e1b4
PS
92+unset_board_info f90compiler
93+if [info exists old_f90compiler] {
94+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
95+}
96+
97+if { $err != "" } {
98 untested "Couldn't compile ${srcfile}"
99 return -1
100 }
a7de96f0 101Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dwarf-stride.exp
6ed6bacf 102===================================================================
a7de96f0
PS
103--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2012-07-03 17:30:07.000000000 +0200
104+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2012-07-03 17:50:58.002207535 +0200
6ed6bacf
AM
105@@ -27,7 +27,25 @@
106 set testfile dwarf-stride
107 set srcfile ${testfile}.f90
108
f412e1b4
PS
109-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}] } {
110+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
111+
112+set board [target_info name]
f412e1b4
PS
113+if [board_info $board exists f90compiler] {
114+ set old_f90compiler [board_info $board f90compiler]
115+ unset_board_info f90compiler
116+} elseif [info exists old_f90compiler] {
117+ unset old_f90compiler
6ed6bacf 118+}
f412e1b4 119+set_board_info f90compiler gfortran44
6ed6bacf 120+
f412e1b4 121+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}]
6ed6bacf 122+
f412e1b4
PS
123+unset_board_info f90compiler
124+if [info exists old_f90compiler] {
125+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
126+}
127+
128+if $err {
129 return -1
130 }
131
a7de96f0 132Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dynamic.exp
6ed6bacf 133===================================================================
a7de96f0
PS
134--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2012-07-03 17:30:07.000000000 +0200
135+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/dynamic.exp 2012-07-03 17:50:58.002207535 +0200
6ed6bacf
AM
136@@ -25,7 +25,25 @@ set testfile "dynamic"
137 set srcfile ${testfile}.f90
138 set binfile ${objdir}/${subdir}/${testfile}
139
f412e1b4
PS
140-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
141+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
142+
143+set board [target_info name]
f412e1b4
PS
144+if [board_info $board exists f90compiler] {
145+ set old_f90compiler [board_info $board f90compiler]
146+ unset_board_info f90compiler
147+} elseif [info exists old_f90compiler] {
148+ unset old_f90compiler
6ed6bacf 149+}
f412e1b4 150+set_board_info f90compiler gfortran44
6ed6bacf 151+
f412e1b4 152+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
6ed6bacf 153+
f412e1b4
PS
154+unset_board_info f90compiler
155+if [info exists old_f90compiler] {
156+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
157+}
158+
159+if { $err != "" } {
160 untested "Couldn't compile ${srcfile}"
161 return -1
162 }
a7de96f0 163Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/library-module.exp
6ed6bacf 164===================================================================
a7de96f0
PS
165--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/library-module.exp 2012-06-25 22:51:35.000000000 +0200
166+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/library-module.exp 2012-07-03 17:52:57.666062981 +0200
167@@ -23,16 +23,34 @@ if [get_compiler_info] {
6ed6bacf
AM
168 return -1
169 }
170
a7de96f0 171-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}] != "" } {
6ed6bacf
AM
172- untested "Couldn't compile ${srclibfile}"
173- return -1
f412e1b4 174+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
175+
176+set board [target_info name]
f412e1b4
PS
177+if [board_info $board exists f90compiler] {
178+ set old_f90compiler [board_info $board f90compiler]
179+ unset_board_info f90compiler
180+} elseif [info exists old_f90compiler] {
181+ unset old_f90compiler
6ed6bacf 182 }
f412e1b4 183+set_board_info f90compiler gfortran44
6ed6bacf
AM
184
185 # prepare_for_testing cannot be used as linking with $libfile cannot be passed
186 # just for the linking phase (and not the source compilation phase). And any
187 # warnings on ignored $libfile abort the process.
188
a7de96f0
PS
189-if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]] != "" } {
190+set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}]
191+set err2 [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug f90 shlib=$libfile]]
6ed6bacf 192+
f412e1b4
PS
193+unset_board_info f90compiler
194+if [info exists old_f90compiler] {
195+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
196+}
197+
198+if { $err1 != "" } {
199+ untested "Couldn't compile ${srclibfile}"
200+ return -1
201+}
202+if { $err2 != "" } {
203 untested "Couldn't compile ${srcfile}"
204 return -1
205 }
a7de96f0 206Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/module.exp
6ed6bacf 207===================================================================
a7de96f0
PS
208--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/module.exp 2012-06-25 22:51:35.000000000 +0200
209+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/module.exp 2012-07-03 17:53:56.464992086 +0200
210@@ -15,7 +15,25 @@
211
212 standard_testfile .f90
6ed6bacf 213
f412e1b4
PS
214-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
215+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
216+
217+set board [target_info name]
f412e1b4
PS
218+if [board_info $board exists f90compiler] {
219+ set old_f90compiler [board_info $board f90compiler]
220+ unset_board_info f90compiler
221+} elseif [info exists old_f90compiler] {
222+ unset old_f90compiler
6ed6bacf 223+}
f412e1b4 224+set_board_info f90compiler gfortran44
6ed6bacf 225+
f412e1b4 226+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
6ed6bacf 227+
f412e1b4
PS
228+unset_board_info f90compiler
229+if [info exists old_f90compiler] {
230+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
231+}
232+
233+if $err {
234 return -1
235 }
236
a7de96f0 237Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/string.exp
6ed6bacf 238===================================================================
a7de96f0
PS
239--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/string.exp 2012-07-03 17:30:07.000000000 +0200
240+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/string.exp 2012-07-03 17:50:58.005207532 +0200
6ed6bacf
AM
241@@ -23,7 +23,25 @@ set testfile "string"
242 set srcfile ${testfile}.f90
243 set binfile ${objdir}/${subdir}/${testfile}
244
f412e1b4
PS
245-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}] != "" } {
246+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
247+
248+set board [target_info name]
f412e1b4
PS
249+if [board_info $board exists f90compiler] {
250+ set old_f90compiler [board_info $board f90compiler]
251+ unset_board_info f90compiler
252+} elseif [info exists old_f90compiler] {
253+ unset old_f90compiler
6ed6bacf 254+}
f412e1b4 255+set_board_info f90compiler gfortran44
6ed6bacf 256+
f412e1b4 257+set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f90 quiet}]
6ed6bacf 258+
f412e1b4
PS
259+unset_board_info f90compiler
260+if [info exists old_f90compiler] {
261+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
262+}
263+
264+if { $err != "" } {
265 untested "Couldn't compile ${srcfile}"
266 return -1
267 }
a7de96f0 268Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/omp-step.exp
6ed6bacf 269===================================================================
a7de96f0
PS
270--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2012-07-03 17:36:21.000000000 +0200
271+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/omp-step.exp 2012-07-03 17:50:58.006207531 +0200
6ed6bacf
AM
272@@ -15,7 +15,26 @@
273
274 set testfile "omp-step"
275 set srcfile ${testfile}.f90
f412e1b4 276-if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90 additional_flags=-fopenmp}] } {
6ed6bacf 277+
f412e1b4 278+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
279+
280+set board [target_info name]
f412e1b4
PS
281+if [board_info $board exists f90compiler] {
282+ set old_f90compiler [board_info $board f90compiler]
283+ unset_board_info f90compiler
284+} elseif [info exists old_f90compiler] {
285+ unset old_f90compiler
6ed6bacf 286+}
f412e1b4 287+set_board_info f90compiler gfortran44
6ed6bacf 288+
f412e1b4 289+set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90 additional_flags=-fopenmp}]
6ed6bacf 290+
f412e1b4
PS
291+unset_board_info f90compiler
292+if [info exists old_f90compiler] {
293+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
294+}
295+
296+if $err {
297 return -1
298 }
299
a7de96f0 300Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/derived-type.exp
6ed6bacf 301===================================================================
a7de96f0
PS
302--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2012-06-25 22:51:35.000000000 +0200
303+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/derived-type.exp 2012-07-03 17:55:46.583858849 +0200
304@@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1
305
306 standard_testfile .f90
6ed6bacf 307
a7de96f0 308-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
f412e1b4 309+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
310+
311+set board [target_info name]
f412e1b4
PS
312+if [board_info $board exists f90compiler] {
313+ set old_f90compiler [board_info $board f90compiler]
314+ unset_board_info f90compiler
315+} elseif [info exists old_f90compiler] {
316+ unset old_f90compiler
6ed6bacf 317+}
f412e1b4 318+set_board_info f90compiler gfortran44
6ed6bacf 319+
a7de96f0 320+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
6ed6bacf 321+
f412e1b4
PS
322+unset_board_info f90compiler
323+if [info exists old_f90compiler] {
324+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
325+}
326+
a7de96f0 327+if $err {
6ed6bacf
AM
328 return -1
329 }
330
a7de96f0 331Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/subarray.exp
6ed6bacf 332===================================================================
a7de96f0
PS
333--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.fortran/subarray.exp 2012-06-25 22:51:35.000000000 +0200
334+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.fortran/subarray.exp 2012-07-03 17:56:20.454818198 +0200
335@@ -22,7 +22,25 @@ if { [skip_fortran_tests] } { return -1
336
337 standard_testfile .f
6ed6bacf 338
a7de96f0 339-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
f412e1b4 340+# Temporarily provide f90compiler=gfortran44 saving the original value around.
6ed6bacf
AM
341+
342+set board [target_info name]
f412e1b4
PS
343+if [board_info $board exists f90compiler] {
344+ set old_f90compiler [board_info $board f90compiler]
345+ unset_board_info f90compiler
346+} elseif [info exists old_f90compiler] {
347+ unset old_f90compiler
6ed6bacf 348+}
f412e1b4 349+set_board_info f90compiler gfortran44
6ed6bacf 350+
a7de96f0 351+set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]
6ed6bacf 352+
f412e1b4
PS
353+unset_board_info f90compiler
354+if [info exists old_f90compiler] {
355+ set_board_info f90compiler $old_f90compiler
6ed6bacf
AM
356+}
357+
a7de96f0 358+if $err {
6ed6bacf
AM
359 return -1
360 }
361
a7de96f0 362Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/tls-sepdebug.exp
6ed6bacf 363===================================================================
a7de96f0
PS
364--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2012-07-03 17:32:05.000000000 +0200
365+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2012-07-03 17:50:58.007207530 +0200
6ed6bacf
AM
366@@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi
367
368 # FIXME: gcc dependency (-Wl,-soname).
369
370-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } {
371+# Temporarily provide compiler=gcc44 saving the original value around.
372+
373+set board [target_info name]
374+if [board_info $board exists compiler] {
375+ set old_compiler [board_info $board compiler]
376+ unset_board_info compiler
377+} elseif [info exists old_compiler] {
378+ unset old_compiler
379+}
380+set_board_info compiler gcc44
381+
382+set err [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]]
383+
384+unset_board_info compiler
385+if [info exists old_compiler] {
386+ set_board_info compiler $old_compiler
387+}
388+
389+if { $err != "" } {
390 untested "Couldn't compile test library"
391 return -1
392 }
a7de96f0 393Index: gdb-7.4.50.20120703/gdb/testsuite/lib/prelink-support.exp
6ed6bacf 394===================================================================
a7de96f0
PS
395--- gdb-7.4.50.20120703.orig/gdb/testsuite/lib/prelink-support.exp 2012-07-03 17:44:45.000000000 +0200
396+++ gdb-7.4.50.20120703/gdb/testsuite/lib/prelink-support.exp 2012-07-03 17:50:58.008207529 +0200
f412e1b4 397@@ -119,9 +119,31 @@ proc file_copy {src dest} {
6ed6bacf
AM
398 proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} {
399 global objdir subdir
400
401- if {[build_executable $testname $executable $sources $options] == -1} {
402- return ""
403+ # Temporarily provide compiler=gcc44 saving the original value around.
404+ # RHEL-5 workaround of its:
405+ # gcc: -rpath: linker input file unused because linking not done
406+ # gcc: --dynamic-linker: linker input file unused because linking not done
407+
408+ set board [target_info name]
409+ if [board_info $board exists compiler] {
410+ set old_compiler [board_info $board compiler]
411+ unset_board_info compiler
412+ } elseif [info exists old_compiler] {
413+ unset old_compiler
f412e1b4 414+ }
6ed6bacf
AM
415+ set_board_info compiler gcc44
416+
417+ set err [build_executable $testname $executable $sources $options]
418+
419+ unset_board_info compiler
420+ if [info exists old_compiler] {
421+ set_board_info compiler $old_compiler
f412e1b4 422 }
6ed6bacf
AM
423+
424+ if { $err == -1 } {
425+ return ""
426+ }
427+
428 set binfile ${objdir}/${subdir}/${executable}
429
430 set command "ldd $binfile"
This page took 0.504073 seconds and 4 git commands to generate.