Blame baseboards/mmixware-sim.exp

Packit 62fe53
# Copyright (C) 1997-2016 Free Software Foundation, Inc.
Packit 62fe53
#
Packit 62fe53
# This file is part of DejaGnu.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is free software; you can redistribute it and/or modify it
Packit 62fe53
# under the terms of the GNU General Public License as published by
Packit 62fe53
# the Free Software Foundation; either version 3 of the License, or
Packit 62fe53
# (at your option) any later version.
Packit 62fe53
#
Packit 62fe53
# DejaGnu is distributed in the hope that it will be useful, but
Packit 62fe53
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 62fe53
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 62fe53
# General Public License for more details.
Packit 62fe53
#
Packit 62fe53
# You should have received a copy of the GNU General Public License
Packit 62fe53
# along with DejaGnu; if not, write to the Free Software Foundation,
Packit 62fe53
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Packit 62fe53
Packit 62fe53
# This is a list of toolchains that are supported on this board.
Packit 62fe53
set_board_info target_install  {mmix-knuth-mmixware}
Packit 62fe53
Packit 62fe53
# Load the generic configuration for this board. This will define any
Packit 62fe53
# routines needed to communicate with the board.
Packit 62fe53
load_generic_config "sim"
Packit 62fe53
Packit 62fe53
# Unset the slow_simulator flag; this simulator isn't slow.  (I haven't
Packit 62fe53
# found documentation as to what constitutes a "slow" simulator and
Packit 62fe53
# there's no reference to that variable in the GCC test-suite, but all
Packit 62fe53
# tests I've found work.)
Packit 62fe53
unset_board_info slow_simulator
Packit 62fe53
Packit 62fe53
# We don't use basic-sim.exp and setup_sim because the simulator, called
Packit 62fe53
# "mmix", is external to the build tree.  If nobody set the simulator
Packit 62fe53
# name, we set it to "mmix", so the rest of the framework works.  Let $SIM
Packit 62fe53
# override.
Packit 62fe53
if {![board_info $board exists sim]} {
Packit 62fe53
    if {[info exists SIM]} {
Packit 62fe53
	set_board_info sim $SIM
Packit 62fe53
    } else {
Packit 62fe53
	# Has to exist in the users path.
Packit 62fe53
	set_board_info sim mmix
Packit 62fe53
    }
Packit 62fe53
}
Packit 62fe53
Packit 62fe53
# No default multilib options are needed for this board.
Packit 62fe53
process_multilib_options ""
Packit 62fe53
Packit 62fe53
set_board_info is_simulator 1
Packit 62fe53
Packit 62fe53
# It isn't visible in the target triple, so we set it explicitly.  The
Packit 62fe53
# *linked* format is currently mmo, but those cases where this matters we
Packit 62fe53
# can deal with separately.
Packit 62fe53
set_board_info obj_format "elf"
Packit 62fe53
Packit 62fe53
# The compiler used to build for this board. This has *nothing* to do
Packit 62fe53
# with what compiler is tested if we're testing gcc.
Packit 62fe53
set_board_info compiler  "[find_gcc]"
Packit 62fe53
Packit 62fe53
# We only support newlib on this target. We assume that all multilib
Packit 62fe53
# options have been specified before we get here.
Packit 62fe53
set_board_info cflags  "[newlib_include_flags]"
Packit 62fe53
Packit 62fe53
# We put the stack in the code segment, so trampolines work; the mmix
Packit 62fe53
# simulator does not allow code to be executed in the "normal" documented
Packit 62fe53
# data and stack segments.  Use a somewhat magic number, so stack addresses
Packit 62fe53
# are easily recognized when debugging.
Packit 62fe53
set_board_info ldflags "[newlib_link_flags] -Wl,--defsym,__Stack_start=0x1680a00000000000"
Packit 62fe53
Packit 62fe53
# No linker script needed - the simulator is the main environment for this
Packit 62fe53
# target.
Packit 62fe53
set_board_info ldscript ""
Packit 62fe53
Packit 62fe53
# Return codes aren't supported by the simulator.
Packit 62fe53
set_board_info needs_status_wrapper 1