]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/boards/cc-with-tweaks.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / boards / cc-with-tweaks.exp
CommitLineData
213516ef 1# Copyright 2013-2023 Free Software Foundation, Inc.
aebb1cc9
DE
2
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.
7#
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.
12#
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/>.
15
16# This file is a dejagnu "board file" and is used to run the testsuite
17# with contrib/cc-with-tweaks.sh.
18#
19# NOTE: If using dwz, We assume it is in $PATH.
20#
21# Example usage:
c30391f8 22# bash$ cd $objdir/gdb
aebb1cc9
DE
23# bash$ make check \
24# RUNTESTFLAGS='--target_board=cc-with-tweaks' \
25# CC_WITH_TWEAKS_FLAGS='-z'
26#
c30391f8
TV
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.
29#
aebb1cc9
DE
30# The default value of CC_WITH_TWEAKS_FLAGS is "".
31
32if ![info exists CC_WITH_TWEAKS_FLAGS] {
33 set CC_WITH_TWEAKS_FLAGS ""
34}
35
36# This is needed otherwise dejagnu tries to rsh to host "cc-with-tweaks".
f1af7b94 37load_board_description "local-board"
aebb1cc9
DE
38
39# This is based on baseboards/unix.exp.
40# At the moment we only support systems that unix.exp supports.
41load_generic_config "unix"
42process_multilib_options ""
43set found_gcc [find_gcc]
44set found_gxx [find_g++]
8a516164 45set found_gnatmake [find_gnatmake]
7ff5fae7 46set found_f90 [find_gfortran]
aebb1cc9
DE
47set_board_info compiler "$found_gcc"
48
49set contrib_dir [file normalize $srcdir/../contrib]
50if ![info exists CC_FOR_TARGET] {
51 set CC_FOR_TARGET "$found_gcc"
52}
f00674fe 53set CC_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CC_FOR_TARGET"
aebb1cc9
DE
54if ![info exists CXX_FOR_TARGET] {
55 set CXX_FOR_TARGET "$found_gxx"
56}
f00674fe 57set CXX_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CXX_FOR_TARGET"
8a516164
TT
58if ![info exists GNATMAKE_FOR_TARGET] {
59 set GNATMAKE_FOR_TARGET "$found_gnatmake"
60}
61set GNATMAKE_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $GNATMAKE_FOR_TARGET"
7ff5fae7
AB
62if ![info exists F90_FOR_TARGET] {
63 set F90_FOR_TARGET "$found_f90"
64}
65set F90_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $F90_FOR_TARGET"
f59f30f5 66
436b5e99
TV
67set env(GDB) \
68 [cached_file gdb.sh "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS \"\$@\"" 1]