1 # Copyright
2013-2021 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
3 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
, see
<http
://www.gnu.org
/licenses
/>.
16 # This file is a dejagnu
"board file" and is used to run the testsuite
17 # with contrib
/cc
-with
-tweaks.sh.
19 # NOTE
: If using dwz
, We assume it is in $PATH.
22 # bash$ cd $objdir
/gdb
24 # RUNTESTFLAGS
='--target_board=cc-with-tweaks' \
25 # CC_WITH_TWEAKS_FLAGS
='-z'
27 # Note
: this does not work from $objdir with make check
-gdb because
28 # CC_WITH_TWEAKS_FLAGS is not passed down from the top level Makefile.
30 # The default value of CC_WITH_TWEAKS_FLAGS is
"".
32 if ![info exists CC_WITH_TWEAKS_FLAGS
] {
33 set CC_WITH_TWEAKS_FLAGS
""
36 # This is needed otherwise dejagnu tries to rsh to host
"cc-with-tweaks".
37 load_board_description
"local-board"
39 # This is based
on baseboards
/unix.exp.
40 # At the moment we only support systems that unix.exp supports.
41 load_generic_config
"unix"
42 process_multilib_options
""
43 set found_gcc
[find_gcc
]
44 set found_gxx
[find_g
++]
45 set found_gnatmake
[find_gnatmake
]
46 set found_f90
[find_gfortran
]
47 set found_f77
[find_g77
]
48 set_board_info compiler
"$found_gcc"
50 set contrib_dir
[file normalize $srcdir
/..
/contrib
]
51 if ![info exists CC_FOR_TARGET
] {
52 set CC_FOR_TARGET
"$found_gcc"
54 set CC_FOR_TARGET
"$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CC_FOR_TARGET"
55 if ![info exists CXX_FOR_TARGET
] {
56 set CXX_FOR_TARGET
"$found_gxx"
58 set CXX_FOR_TARGET
"$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CXX_FOR_TARGET"
59 if ![info exists GNATMAKE_FOR_TARGET
] {
60 set GNATMAKE_FOR_TARGET
"$found_gnatmake"
62 set GNATMAKE_FOR_TARGET
"$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $GNATMAKE_FOR_TARGET"
63 if ![info exists F90_FOR_TARGET
] {
64 set F90_FOR_TARGET
"$found_f90"
66 set F90_FOR_TARGET
"$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $F90_FOR_TARGET"
67 if ![info exists F77_FOR_TARGET
] {
68 set F77_FOR_TARGET
"$found_f77"
70 set F77_FOR_TARGET
"$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $F77_FOR_TARGET"
73 [cached_file gdb.sh
"$GDB $INTERNAL_GDBFLAGS $GDBFLAGS \"\$@\"" 1]