1 # Copyright
(C
) 2004 Free Software Foundation
, Inc.
3 # This
program is free software
; you can redistribute it and
/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation
; either version
2 of the License
, or
6 #
(at your option
) any later version.
8 # This
program is distributed in the hope that it will be useful
,
9 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License
for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this
program; if not
, write to the Free Software
15 # Foundation
, Inc.
, 51 Franklin Street
, Fifth Floor
, Boston
, MA
02110-1301, USA.
17 # This file contains GCC
-specifics
for status wrappers
for test programs.
19 # $
{tool
}_maybe_build_wrapper
-- Build wrapper object
if the target needs it.
21 proc $
{tool
}_maybe_build_wrapper
{ filename
args } {
22 global gluefile wrap_flags
24 if { [target_info needs_status_wrapper
] != "" \
25 && [target_info needs_status_wrapper
] != "0" \
26 && ![info exists gluefile
] } {
27 set saved_wrap_compile_flags
[target_info wrap_compile_flags
]
28 set flags
[join $
args " "]
29 # The wrapper code may contain code that gcc objects
on. This
30 # became true
for dejagnu
-1.4.4. The
set of warnings and code
31 # that gcc objects
on may change
, so just make sure
-w is always
32 # passed to turn
off all warnings.
33 set_currtarget_info wrap_compile_flags \
34 "$saved_wrap_compile_flags -w $flags"
35 set result
[build_wrapper $filename
]
36 set_currtarget_info wrap_compile_flags
"$saved_wrap_compile_flags"
37 if { $result
!= "" } {
38 set gluefile
[lindex $result
0]
39 set wrap_flags
[lindex $result
1]