Commit | Line | Data |
---|---|---|
618f726f | 1 | # Copyright 2013-2016 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: | |
22 | # bash$ make check \ | |
23 | # RUNTESTFLAGS='--target_board=cc-with-tweaks' \ | |
24 | # CC_WITH_TWEAKS_FLAGS='-z' | |
25 | # | |
26 | # The default value of CC_WITH_TWEAKS_FLAGS is "". | |
27 | ||
28 | if ![info exists CC_WITH_TWEAKS_FLAGS] { | |
29 | set CC_WITH_TWEAKS_FLAGS "" | |
30 | } | |
31 | ||
32 | # This is needed otherwise dejagnu tries to rsh to host "cc-with-tweaks". | |
33 | # set_board_info only sets the value if not already set. | |
34 | # find_gcc checks for this, so set early. | |
35 | unset_board_info isremote | |
36 | set_board_info isremote 0 | |
37 | ||
38 | # This is based on baseboards/unix.exp. | |
39 | # At the moment we only support systems that unix.exp supports. | |
40 | load_generic_config "unix" | |
41 | process_multilib_options "" | |
42 | set found_gcc [find_gcc] | |
43 | set found_gxx [find_g++] | |
44 | set_board_info compiler "$found_gcc" | |
45 | ||
46 | set contrib_dir [file normalize $srcdir/../contrib] | |
47 | if ![info exists CC_FOR_TARGET] { | |
48 | set CC_FOR_TARGET "$found_gcc" | |
49 | } | |
50 | set CC_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CC_FOR_TARGET" | |
51 | if ![info exists CXX_FOR_TARGET] { | |
52 | set CXX_FOR_TARGET "$found_gxx" | |
53 | } | |
54 | set CXX_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CXX_FOR_TARGET" |