]>
Commit | Line | Data |
---|---|---|
6ed6bacf AM |
1 | Some functionality is available on RHEL-5.4+ only with gcc44 and gfortran44 as |
2 | the default gcc and gfortran binaries are from gcc-4.1. | |
3 | ||
4 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/vla.exp | |
5 | =================================================================== | |
6 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.base/vla.exp 2010-11-16 09:26:50.000000000 +0100 | |
7 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/vla.exp 2010-11-16 09:27:20.000000000 +0100 | |
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 | } | |
35 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.base/break-interp.exp | |
36 | =================================================================== | |
37 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.base/break-interp.exp 2010-10-12 20:41:06.000000000 +0200 | |
38 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.base/break-interp.exp 2010-11-16 09:28:40.000000000 +0100 | |
39 | @@ -33,9 +33,29 @@ if [get_compiler_info ${binfile_lib}] { | |
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 | ||
70 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp | |
71 | =================================================================== | |
72 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/common-block.exp 2010-11-16 09:26:54.000000000 +0100 | |
73 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/common-block.exp 2010-11-16 09:27:20.000000000 +0100 | |
74 | @@ -20,7 +20,25 @@ set testfile "common-block" | |
75 | set srcfile ${testfile}.f90 | |
76 | set binfile ${objdir}/${subdir}/${testfile} | |
77 | ||
78 | -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { | |
79 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
80 | + | |
81 | +set board [target_info name] | |
82 | +if [board_info $board exists f77compiler] { | |
83 | + set old_f77compiler [board_info $board f77compiler] | |
84 | + unset_board_info f77compiler | |
85 | +} elseif [info exists old_f77compiler] { | |
86 | + unset old_f77compiler | |
87 | +} | |
88 | +set_board_info f77compiler gfortran44 | |
89 | + | |
90 | +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] | |
91 | + | |
92 | +unset_board_info f77compiler | |
93 | +if [info exists old_f77compiler] { | |
94 | + set_board_info f77compiler $old_f77compiler | |
95 | +} | |
96 | + | |
97 | +if { $err != "" } { | |
98 | untested "Couldn't compile ${srcfile}" | |
99 | return -1 | |
100 | } | |
101 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp | |
102 | =================================================================== | |
103 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-11-16 09:26:50.000000000 +0100 | |
104 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dwarf-stride.exp 2010-11-16 09:27:20.000000000 +0100 | |
105 | @@ -27,7 +27,25 @@ | |
106 | set testfile dwarf-stride | |
107 | set srcfile ${testfile}.f90 | |
108 | ||
109 | -if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] } { | |
110 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
111 | + | |
112 | +set board [target_info name] | |
113 | +if [board_info $board exists f77compiler] { | |
114 | + set old_f77compiler [board_info $board f77compiler] | |
115 | + unset_board_info f77compiler | |
116 | +} elseif [info exists old_f77compiler] { | |
117 | + unset old_f77compiler | |
118 | +} | |
119 | +set_board_info f77compiler gfortran44 | |
120 | + | |
121 | +set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77}] | |
122 | + | |
123 | +unset_board_info f77compiler | |
124 | +if [info exists old_f77compiler] { | |
125 | + set_board_info f77compiler $old_f77compiler | |
126 | +} | |
127 | + | |
128 | +if $err { | |
129 | return -1 | |
130 | } | |
131 | ||
132 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp | |
133 | =================================================================== | |
134 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/dynamic.exp 2010-11-16 09:26:50.000000000 +0100 | |
135 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/dynamic.exp 2010-11-16 09:27:20.000000000 +0100 | |
136 | @@ -25,7 +25,25 @@ set testfile "dynamic" | |
137 | set srcfile ${testfile}.f90 | |
138 | set binfile ${objdir}/${subdir}/${testfile} | |
139 | ||
140 | -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { | |
141 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
142 | + | |
143 | +set board [target_info name] | |
144 | +if [board_info $board exists f77compiler] { | |
145 | + set old_f77compiler [board_info $board f77compiler] | |
146 | + unset_board_info f77compiler | |
147 | +} elseif [info exists old_f77compiler] { | |
148 | + unset old_f77compiler | |
149 | +} | |
150 | +set_board_info f77compiler gfortran44 | |
151 | + | |
152 | +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] | |
153 | + | |
154 | +unset_board_info f77compiler | |
155 | +if [info exists old_f77compiler] { | |
156 | + set_board_info f77compiler $old_f77compiler | |
157 | +} | |
158 | + | |
159 | +if { $err != "" } { | |
160 | untested "Couldn't compile ${srcfile}" | |
161 | return -1 | |
162 | } | |
163 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp | |
164 | =================================================================== | |
165 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/library-module.exp 2010-06-03 00:41:56.000000000 +0200 | |
166 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/library-module.exp 2010-11-16 09:27:20.000000000 +0100 | |
167 | @@ -25,16 +25,34 @@ if [get_compiler_info not-used] { | |
168 | return -1 | |
169 | } | |
170 | ||
171 | -if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}] != "" } { | |
172 | - untested "Couldn't compile ${srclibfile}" | |
173 | - return -1 | |
174 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
175 | + | |
176 | +set board [target_info name] | |
177 | +if [board_info $board exists f77compiler] { | |
178 | + set old_f77compiler [board_info $board f77compiler] | |
179 | + unset_board_info f77compiler | |
180 | +} elseif [info exists old_f77compiler] { | |
181 | + unset old_f77compiler | |
182 | } | |
183 | +set_board_info f77compiler gfortran44 | |
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 | ||
189 | -if { [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}] != "" } { | |
190 | +set err1 [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $objdir/$subdir/$libfile {debug f77}] | |
191 | +set err2 [gdb_compile [list $srcdir/$subdir/$srcfile $objdir/$subdir/$libfile] $objdir/$subdir/$binfile executable {debug f77}] | |
192 | + | |
193 | +unset_board_info f77compiler | |
194 | +if [info exists old_f77compiler] { | |
195 | + set_board_info f77compiler $old_f77compiler | |
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 | } | |
206 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp | |
207 | =================================================================== | |
208 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/module.exp 2010-09-22 21:22:44.000000000 +0200 | |
209 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/module.exp 2010-11-16 09:27:20.000000000 +0100 | |
210 | @@ -16,7 +16,25 @@ | |
211 | set testfile "module" | |
212 | set srcfile ${testfile}.f90 | |
213 | ||
214 | -if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } { | |
215 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
216 | + | |
217 | +set board [target_info name] | |
218 | +if [board_info $board exists f77compiler] { | |
219 | + set old_f77compiler [board_info $board f77compiler] | |
220 | + unset_board_info f77compiler | |
221 | +} elseif [info exists old_f77compiler] { | |
222 | + unset old_f77compiler | |
223 | +} | |
224 | +set_board_info f77compiler gfortran44 | |
225 | + | |
226 | +set err [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] | |
227 | + | |
228 | +unset_board_info f77compiler | |
229 | +if [info exists old_f77compiler] { | |
230 | + set_board_info f77compiler $old_f77compiler | |
231 | +} | |
232 | + | |
233 | +if $err { | |
234 | return -1 | |
235 | } | |
236 | ||
237 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp | |
238 | =================================================================== | |
239 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/string.exp 2010-11-16 09:26:50.000000000 +0100 | |
240 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/string.exp 2010-11-16 09:27:20.000000000 +0100 | |
241 | @@ -23,7 +23,25 @@ set testfile "string" | |
242 | set srcfile ${testfile}.f90 | |
243 | set binfile ${objdir}/${subdir}/${testfile} | |
244 | ||
245 | -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } { | |
246 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
247 | + | |
248 | +set board [target_info name] | |
249 | +if [board_info $board exists f77compiler] { | |
250 | + set old_f77compiler [board_info $board f77compiler] | |
251 | + unset_board_info f77compiler | |
252 | +} elseif [info exists old_f77compiler] { | |
253 | + unset old_f77compiler | |
254 | +} | |
255 | +set_board_info f77compiler gfortran44 | |
256 | + | |
257 | +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] | |
258 | + | |
259 | +unset_board_info f77compiler | |
260 | +if [info exists old_f77compiler] { | |
261 | + set_board_info f77compiler $old_f77compiler | |
262 | +} | |
263 | + | |
264 | +if { $err != "" } { | |
265 | untested "Couldn't compile ${srcfile}" | |
266 | return -1 | |
267 | } | |
268 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp | |
269 | =================================================================== | |
270 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/omp-step.exp 2010-11-16 09:26:54.000000000 +0100 | |
271 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/omp-step.exp 2010-11-16 09:27:20.000000000 +0100 | |
272 | @@ -15,7 +15,26 @@ | |
273 | ||
274 | set testfile "omp-step" | |
275 | set srcfile ${testfile}.f90 | |
276 | -if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77 additional_flags=-fopenmp}] } { | |
277 | + | |
278 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
279 | + | |
280 | +set board [target_info name] | |
281 | +if [board_info $board exists f77compiler] { | |
282 | + set old_f77compiler [board_info $board f77compiler] | |
283 | + unset_board_info f77compiler | |
284 | +} elseif [info exists old_f77compiler] { | |
285 | + unset old_f77compiler | |
286 | +} | |
287 | +set_board_info f77compiler gfortran44 | |
288 | + | |
289 | +set err [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f77 additional_flags=-fopenmp}] | |
290 | + | |
291 | +unset_board_info f77compiler | |
292 | +if [info exists old_f77compiler] { | |
293 | + set_board_info f77compiler $old_f77compiler | |
294 | +} | |
295 | + | |
296 | +if $err { | |
297 | return -1 | |
298 | } | |
299 | ||
300 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp | |
301 | =================================================================== | |
302 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/derived-type.exp 2010-01-01 08:32:02.000000000 +0100 | |
303 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/derived-type.exp 2010-11-16 09:27:20.000000000 +0100 | |
304 | @@ -28,8 +28,26 @@ set testfile "derived-type" | |
305 | set srcfile ${testfile}.f90 | |
306 | set binfile ${objdir}/${subdir}/${testfile} | |
307 | ||
308 | -if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ | |
309 | - executable {debug f77}] != ""} { | |
310 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
311 | + | |
312 | +set board [target_info name] | |
313 | +if [board_info $board exists f77compiler] { | |
314 | + set old_f77compiler [board_info $board f77compiler] | |
315 | + unset_board_info f77compiler | |
316 | +} elseif [info exists old_f77compiler] { | |
317 | + unset old_f77compiler | |
318 | +} | |
319 | +set_board_info f77compiler gfortran44 | |
320 | + | |
321 | +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ | |
322 | + executable {debug f77}] | |
323 | + | |
324 | +unset_board_info f77compiler | |
325 | +if [info exists old_f77compiler] { | |
326 | + set_board_info f77compiler $old_f77compiler | |
327 | +} | |
328 | + | |
329 | +if { $err != "" } { | |
330 | return -1 | |
331 | } | |
332 | ||
333 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp | |
334 | =================================================================== | |
335 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.fortran/subarray.exp 2010-01-01 08:32:02.000000000 +0100 | |
336 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.fortran/subarray.exp 2010-11-16 09:27:20.000000000 +0100 | |
337 | @@ -28,8 +28,26 @@ set testfile "subarray" | |
338 | set srcfile ${testfile}.f | |
339 | set binfile ${objdir}/${subdir}/${testfile} | |
340 | ||
341 | -if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ | |
342 | - executable {debug f77}] != ""} { | |
343 | +# Temporarily provide f77compiler=gfortran44 saving the original value around. | |
344 | + | |
345 | +set board [target_info name] | |
346 | +if [board_info $board exists f77compiler] { | |
347 | + set old_f77compiler [board_info $board f77compiler] | |
348 | + unset_board_info f77compiler | |
349 | +} elseif [info exists old_f77compiler] { | |
350 | + unset old_f77compiler | |
351 | +} | |
352 | +set_board_info f77compiler gfortran44 | |
353 | + | |
354 | +set err [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ | |
355 | + executable {debug f77}] | |
356 | + | |
357 | +unset_board_info f77compiler | |
358 | +if [info exists old_f77compiler] { | |
359 | + set_board_info f77compiler $old_f77compiler | |
360 | +} | |
361 | + | |
362 | +if { $err != "" } { | |
363 | return -1 | |
364 | } | |
365 | ||
366 | Index: gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/tls-sepdebug.exp | |
367 | =================================================================== | |
368 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-11-16 09:26:51.000000000 +0100 | |
369 | +++ gdb-7.2.50.20101116/gdb/testsuite/gdb.threads/tls-sepdebug.exp 2010-11-16 09:27:20.000000000 +0100 | |
370 | @@ -32,7 +32,25 @@ set binshareddebugfile ${objdir}/${subdi | |
371 | ||
372 | # FIXME: gcc dependency (-Wl,-soname). | |
373 | ||
374 | -if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] != "" } { | |
375 | +# Temporarily provide compiler=gcc44 saving the original value around. | |
376 | + | |
377 | +set board [target_info name] | |
378 | +if [board_info $board exists compiler] { | |
379 | + set old_compiler [board_info $board compiler] | |
380 | + unset_board_info compiler | |
381 | +} elseif [info exists old_compiler] { | |
382 | + unset old_compiler | |
383 | +} | |
384 | +set_board_info compiler gcc44 | |
385 | + | |
386 | +set err [gdb_compile_shlib "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" [list debug additional_flags=-Wl,-soname=${binsharedbase}]] | |
387 | + | |
388 | +unset_board_info compiler | |
389 | +if [info exists old_compiler] { | |
390 | + set_board_info compiler $old_compiler | |
391 | +} | |
392 | + | |
393 | +if { $err != "" } { | |
394 | untested "Couldn't compile test library" | |
395 | return -1 | |
396 | } | |
397 | Index: gdb-7.2.50.20101116/gdb/testsuite/lib/prelink-support.exp | |
398 | =================================================================== | |
399 | --- gdb-7.2.50.20101116.orig/gdb/testsuite/lib/prelink-support.exp 2010-10-12 20:12:49.000000000 +0200 | |
400 | +++ gdb-7.2.50.20101116/gdb/testsuite/lib/prelink-support.exp 2010-11-16 09:27:20.000000000 +0100 | |
401 | @@ -118,9 +118,31 @@ proc file_copy {src dest} { | |
402 | proc build_executable_own_libs {testname executable sources options {interp ""} {dir ""}} { | |
403 | global objdir subdir | |
404 | ||
405 | - if {[build_executable $testname $executable $sources $options] == -1} { | |
406 | - return "" | |
407 | + # Temporarily provide compiler=gcc44 saving the original value around. | |
408 | + # RHEL-5 workaround of its: | |
409 | + # gcc: -rpath: linker input file unused because linking not done | |
410 | + # gcc: --dynamic-linker: linker input file unused because linking not done | |
411 | + | |
412 | + set board [target_info name] | |
413 | + if [board_info $board exists compiler] { | |
414 | + set old_compiler [board_info $board compiler] | |
415 | + unset_board_info compiler | |
416 | + } elseif [info exists old_compiler] { | |
417 | + unset old_compiler | |
418 | } | |
419 | + set_board_info compiler gcc44 | |
420 | + | |
421 | + set err [build_executable $testname $executable $sources $options] | |
422 | + | |
423 | + unset_board_info compiler | |
424 | + if [info exists old_compiler] { | |
425 | + set_board_info compiler $old_compiler | |
426 | + } | |
427 | + | |
428 | + if { $err == -1 } { | |
429 | + return "" | |
430 | + } | |
431 | + | |
432 | set binfile ${objdir}/${subdir}/${executable} | |
433 | ||
434 | set command "ldd $binfile" |