Add tests for C unit test library
[dejagnu.git] / baseboards / cris-sim.exp
blob0931c94a9d2f45f4017ac3a607559a28335c7b7a
1 # Copyright (C) 1997-2019, 2020 Free Software Foundation, Inc.
3 # This file is part of DejaGnu.
5 # DejaGnu is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # DejaGnu is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with DejaGnu; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 # This is a list of toolchains that are supported on this board.
20 set_board_info target_install {cris-elf crisv32-elf cris-aout cris-linux-gnu crisv32-linux-gnu}
22 # Load the generic configuration for this board. This will define a basic set
23 # of routines needed by the tool to communicate with the board.
24 load_generic_config "sim"
26 # basic-sim.exp is a basic description for the standard Cygnus simulator.
27 load_base_board_description "basic-sim"
29 # The name of the sim subdir in src/sim.
30 setup_sim cris
32 # This simulator isn't slow.
33 set_board_info slow_simulator 0
35 # No multilib options needed by default.
36 process_multilib_options ""
38 set cris_ldopt "-sim3"
39 set cris_simopt ""
41 if {[istarget *-*-linux*]} {
42     set cris_ldopt "-static"
45 # Support different multilibs and targets.
46 foreach x $board_variant_list {
47     regsub -all "^\[ \t\]*" $x "" x
48     regsub -all "\[ \t\]*$" $x "" x
50     switch -- $x {
51         # We force the arch to either pre-v32 (i.e. v10) or v32 for the
52         # "common" compatible subset, by letting the otherwise
53         # functionally equivalent gcc options "-march=..." and
54         # "-mcpu=..." control that.  (We don't have to force the
55         # architecture, but it's easier to make sure we can check that
56         # the "common" subset doesn't lose the compatibility.)
58         # Mnemonic: "a" is 10.
59         "arch=common_v10_v32" -
60         "-march=common_v10_v32" {
61             set cris_simopt "--architecture cris"
62         }
64         # Mnemonic: "c" is... eh... comes after 10!
65         "cpu=common_v10_v32" -
66         "-mcpu=common_v10_v32" {
67             set cris_simopt "--architecture crisv32"
68         }
69     }
72 if { ![board_info $board exists sim,options] && $cris_simopt ne "" } {
73     set_board_info sim,options $cris_simopt
76 # Other than an already-installed glibc, we only support newlib on this
77 # target.  We assume that all multilib options have been specified
78 # before we get here.
80 set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
81 set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags] $cris_ldopt"
82 # No linker script needed.
83 set_board_info ldscript ""