1 # Copyright
(C
) 2012-2016 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
, see
<http
://www.gnu.org
/licenses
/>.
18 # Contributed by Steve Ellcey
<sellcey@mips.com
>.
20 # Use env to check env. variables and modify the simulator.
24 #
Load the generic configuration
for this board. This will
define a basic
25 #
set of routines needed by the tool to communicate with the board.
26 load_generic_config
"sim"
28 # basic
-sim.exp is a basic description
for the standard Cygnus simulator.
29 load_base_board_description
"basic-sim"
31 # The TCL SIM
variable takes precedence over the DEJAGNU_SIM env.
variable
32 if {[info exists env
(DEJAGNU_SIM
)] && ![info exists SIM
]} {
33 set SIM $env
(DEJAGNU_SIM
)
36 # This tells it which directory to look in
for the simulator.
39 # No multilib flags are
set by default.
40 if {[info exists env
(DEJAGNU_SIM_MULTILIB_OPTIONS
)]} {
41 process_multilib_options $env
(DEJAGNU_SIM_MULTILIB_OPTIONS
)
43 process_multilib_options
""
46 # The compiler used to build
for this board. This has
*nothing
* to
do
47 # with what compiler is tested
if we
're testing gcc.
48 if {[info exists env(DEJAGNU_SIM_GCC)]} {
49 set_board_info compiler $env(DEJAGNU_SIM_GCC)
51 set_board_info compiler "[find_gcc]"
54 if {[info exists env(DEJAGNU_SIM_INCLUDE_FLAGS)]} {
55 set_board_info cflags "[libgloss_include_flags] [newlib_include_flags] $env(DEJAGNU_SIM_INCLUDE_FLAGS)"
57 set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
59 if {[info exists env(DEJAGNU_SIM_LINK_FLAGS)]} {
60 set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] $env(DEJAGNU_SIM_LINK_FLAGS)"
62 set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
64 if {[info exists env(DEJAGNU_SIM_LDSCRIPT)]} {
65 set_board_info ldscript $env(DEJAGNU_SIM_LDSCRIPT)
67 if {[info exists env(DEJAGNU_SIM_SPECFILE)]} {
68 set_board_info specfile "-specs=$env(DEJAGNU_SIM_SPECFILE)"
71 if {[info exists env(DEJAGNU_SIM_OPTIONS)]} {
72 set_board_info sim,options $env(DEJAGNU_SIM_OPTIONS)
75 if {[info exists env(DEJAGNU_SIM_BOARD_INFO)]} {
76 foreach e $env(DEJAGNU_SIM_BOARD_INFO) {
77 set_board_info [lindex $e 0] [lindex $e 1]