summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-11-26 19:51:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-11-26 19:51:56 +0000
commit6480e09a8649448b001b2894c87d50c9fb368d28 (patch)
tree5ead76f1023deb10f30233b41c95b3a0a33d7d1b
Initial import.baseinitial
-rw-r--r--Makefile.rtems_gccmain18
-rw-r--r--README37
-rw-r--r--VERSIONS21
-rwxr-xr-xdejagnu/boards/rtems-arm-edb7312.exp39
-rwxr-xr-xdejagnu/boards/rtems-arm-nosim.exp39
-rwxr-xr-xdejagnu/boards/rtems-bfin-nosim.exp39
-rwxr-xr-xdejagnu/boards/rtems-h8300-h8sim.exp40
-rwxr-xr-xdejagnu/boards/rtems-i386-qemu.exp58
-rwxr-xr-xdejagnu/boards/rtems-m32c-m32csim.exp39
-rwxr-xr-xdejagnu/boards/rtems-m68k-nosim.exp39
-rwxr-xr-xdejagnu/boards/rtems-mips-jmr3904.exp42
-rwxr-xr-xdejagnu/boards/rtems-powerpc-psim.exp60
-rwxr-xr-xdejagnu/boards/rtems-sh-simsh1.exp39
-rwxr-xr-xdejagnu/boards/rtems-sparc-sis.exp40
-rwxr-xr-xdo_cpus65
-rwxr-xr-xdo_one573
-rw-r--r--do_tests21
-rw-r--r--gcc/testsuite/ada/acats/Makefile.rtems83
-rw-r--r--gcc/testsuite/ada/acats/rtems_acats_reasons78
-rwxr-xr-xgcc/testsuite/ada/acats/rtems_acats_status52
-rwxr-xr-xgcc/testsuite/ada/acats/rtems_generate_acats_email121
-rw-r--r--gcc/testsuite/ada/acats/rtems_init.c121
-rwxr-xr-xgcc/testsuite/ada/acats/run_all_rtems.sh405
-rwxr-xr-xgcc_status59
-rw-r--r--rtems_gcc_main.c48
-rwxr-xr-xrundeja113
-rwxr-xr-xtest_driver86
27 files changed, 2375 insertions, 0 deletions
diff --git a/Makefile.rtems_gccmain b/Makefile.rtems_gccmain
new file mode 100644
index 0000000..499b609
--- /dev/null
+++ b/Makefile.rtems_gccmain
@@ -0,0 +1,18 @@
+#
+# Makefile for ACATS -- Helps pull BSP specific information
+# into a form the script can use
+#
+
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+include $(RTEMS_CUSTOM)
+include $(PROJECT_ROOT)/make/leaf.cfg
+
+# Tool helpers
+
+all: clean rtems_gcc_main.o
+
+clean:
+ rm -f rtems_gcc_main.o
+
+rtems_gcc_main.o: ${SCRIPTDIR}/rtems_gcc_main.c
+ $(CC) $(CFLAGS) $(CPU_CFLAGS) -c ${SCRIPTDIR}/rtems_gcc_main.c
diff --git a/README b/README
new file mode 100644
index 0000000..e7268de
--- /dev/null
+++ b/README
@@ -0,0 +1,37 @@
+#
+# $Id$
+#
+
+This package contains a collection of scripts and support files
+that support running the GCC (http://gcc.gnu.org) testsuite for
+C, C++, Ada.
+
+This testing environment is used on the GCC Compile Farm as well
+as at OAR.
+
+Source Code and Patches
+=======================
+You are responsible for setting up the source.
+
+
+DejaGNU Support Files
+=====================
+
+${HOME}/.dejagnurc contains the following single line:
+
+ set boards_dir /home/joel/dejagnu/boards
+
+And the tree "dejagnu" in this source package is mirrored
+or symlinked to ${HOME}.
+
+Ada ACATS Testing Support Files
+===============================
+
+The files in gcc/testsuite/ada/acats/ go into that directory
+in the gcc source tree.
+
+C/C++ Support Files
+======================
+
+rtems_gcc_main.c and rundeja go in the top directory
+
diff --git a/VERSIONS b/VERSIONS
new file mode 100644
index 0000000..16fc7be
--- /dev/null
+++ b/VERSIONS
@@ -0,0 +1,21 @@
+# USE FULL PATHS!!!
+BASEDIR=/home/joel/work-gnat/svn/
+
+RTEMS_VERSION=4.10
+
+AUTOCONF=${BASEDIR}/autoconf-2.62
+AUTOMAKE=${BASEDIR}/automake-1.10.1
+GCCDIR=${BASEDIR}/gcc
+BINUTILSDIR=${BASEDIR}/binutils-cvs/src
+GDBDIR=${BASEDIR}/gdb-cvs/src
+RTEMSDIR=${BASEDIR}/rtems
+
+# Needed on GCC CFARM
+# NATIVE_GCC_EXTRA_ARGS="--with-mpfr=/opt/cfarm/mpfr-2.3.1/"
+# GCC_EXTRA_ARGS="--with-mpfr=/opt/cfarm/mpfr-2.3.1/"
+
+INSTALL=${BASEDIR}/install
+BSP_INSTALL=${BASEDIR}/bsp-install
+SCRIPTDIR=${BASEDIR}/gcc-testing-import
+LOGDIR=${BASEDIR}/log
+
diff --git a/dejagnu/boards/rtems-arm-edb7312.exp b/dejagnu/boards/rtems-arm-edb7312.exp
new file mode 100755
index 0000000..0f3952c
--- /dev/null
+++ b/dejagnu/boards/rtems-arm-edb7312.exp
@@ -0,0 +1,39 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "nosim"
+setup_sim edb7312
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-mcpu=arm7tdmi -B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "edb7312"
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-arm-nosim.exp b/dejagnu/boards/rtems-arm-nosim.exp
new file mode 100755
index 0000000..6323f2e
--- /dev/null
+++ b/dejagnu/boards/rtems-arm-nosim.exp
@@ -0,0 +1,39 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "nosim"
+setup_sim nosim
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-mcpu=arm7tdmi -B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "sis-4.9 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-bfin-nosim.exp b/dejagnu/boards/rtems-bfin-nosim.exp
new file mode 100755
index 0000000..4b74d91
--- /dev/null
+++ b/dejagnu/boards/rtems-bfin-nosim.exp
@@ -0,0 +1,39 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "nosim"
+setup_sim nosim
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "sis-4.9 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-h8300-h8sim.exp b/dejagnu/boards/rtems-h8300-h8sim.exp
new file mode 100755
index 0000000..dd6862c
--- /dev/null
+++ b/dejagnu/boards/rtems-h8300-h8sim.exp
@@ -0,0 +1,40 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "nosim"
+setup_sim h8sim
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-mh -mint32 -B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems -DUNDERSCORES -Wl,-wrap,_exit -Wl,-wrap,_main -Wl,-wrap,_abort -Wl,-wrap,_exit-Wl,-wrap,__exit "
+#" -Wl,-wrap,__exit -Wl,-wrap,_exit -Wl,-wrap,__exit -Wl,-wrap,_main -Wl,-wrap,_abort"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "h8sim-4.10 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-i386-qemu.exp b/dejagnu/boards/rtems-i386-qemu.exp
new file mode 100755
index 0000000..e5a9576
--- /dev/null
+++ b/dejagnu/boards/rtems-i386-qemu.exp
@@ -0,0 +1,58 @@
+# Copyright (C) 1997-2008 Free Software
+# Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {powerpc-rtems4.9}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "ppc".
+setup_sim runqemu
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ} -Wl,-Ttext,0x00100000"
+# The simulator isn't really remote.
+set_board_info isremote 0
+
+# We only have a small stack available to us
+# set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "runqemu"
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-m32c-m32csim.exp b/dejagnu/boards/rtems-m32c-m32csim.exp
new file mode 100755
index 0000000..75a3f50
--- /dev/null
+++ b/dejagnu/boards/rtems-m32c-m32csim.exp
@@ -0,0 +1,39 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "nosim"
+setup_sim nosim
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-mcpu=m32cm -B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "m32crun "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-m68k-nosim.exp b/dejagnu/boards/rtems-m68k-nosim.exp
new file mode 100755
index 0000000..57c05bc
--- /dev/null
+++ b/dejagnu/boards/rtems-m68k-nosim.exp
@@ -0,0 +1,39 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "nosim"
+setup_sim nosim
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-m5200 -B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "sis-4.9 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-mips-jmr3904.exp b/dejagnu/boards/rtems-mips-jmr3904.exp
new file mode 100755
index 0000000..8699de8
--- /dev/null
+++ b/dejagnu/boards/rtems-mips-jmr3904.exp
@@ -0,0 +1,42 @@
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mips-rtems4.9}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "ppc".
+setup_sim jm3904-4.9
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems -march=r3900 -Wa,-xgot -G0"
+
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# jmr3904-4.9 is a wrapper script which handles setup
+set_board_info sim "jmr3904-4.9 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-powerpc-psim.exp b/dejagnu/boards/rtems-powerpc-psim.exp
new file mode 100755
index 0000000..9ef7ec5
--- /dev/null
+++ b/dejagnu/boards/rtems-powerpc-psim.exp
@@ -0,0 +1,60 @@
+# Copyright (C) 1997-2008 Free Software
+# Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {powerpc-rtems4.9}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "ppc".
+setup_sim psim-4.9
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems -mcpu=603e"
+ set_board_info cflags "-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "psim-4.9 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-sh-simsh1.exp b/dejagnu/boards/rtems-sh-simsh1.exp
new file mode 100755
index 0000000..b7aa681
--- /dev/null
+++ b/dejagnu/boards/rtems-sh-simsh1.exp
@@ -0,0 +1,39 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "nosim"
+setup_sim simsh70xx
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-m1 -B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "simsh-4.10 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/dejagnu/boards/rtems-sparc-sis.exp b/dejagnu/boards/rtems-sparc-sis.exp
new file mode 100755
index 0000000..10c2eeb
--- /dev/null
+++ b/dejagnu/boards/rtems-sparc-sis.exp
@@ -0,0 +1,40 @@
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparc-rtems4.9}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "ppc".
+setup_sim sis-4.9
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "-B${RTEMS_MAKEFILE_PATH}/lib/ -specs bsp_specs -qrtems -mcpu=cypress"
+set_board_info ldflags "${RTEMS_CONFIG_OBJ}"
+
+# The simulator isn't really remote.
+set_board_info isremote 0
+# We only have a small stack available to us
+set_board_info gcc,stack_size 2048
+
+# psim-4.9 is a wrapper script which handles the device tree
+set_board_info sim "sis-4.9 "
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# Can't call functions from GDB.
+# set_board_info gdb,cannot_call_functions 1
diff --git a/do_cpus b/do_cpus
new file mode 100755
index 0000000..1a42792
--- /dev/null
+++ b/do_cpus
@@ -0,0 +1,65 @@
+#! /bin/sh
+
+
+vfile=`dirname $0`/VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+
+start=`date`
+echo Started at: ${start}
+
+tests=-T
+
+bsp=
+
+exitStatus=0
+for cpu in $*
+do
+ case $cpu in
+ native) bsp=native ;;
+ sparc) bsp=sis ;;
+ powerpc) bsp=psim ;;
+ i386) bsp=pc386 ;;
+ m32c) bsp=m32csim ;;
+ m32r) bsp=m32rsim ;;
+ mips) bsp=jmr3904 ;;
+ bfin) bsp=eZKit533 ;;
+ h8300) bsp=h8sim ;;
+ sh) bsp=simsh1 ;;
+ arm) bsp=edb7312 ;;
+ m68k) bsp=mcf5206elite ;;
+ *)
+ echo "Unknown CPU ${cpu}"
+ exit 1
+ ;;
+ esac
+
+ doOne=${SCRIPTDIR}/do_one
+ echo Building tools for ${cpu} and testing on ${bsp} ...
+ if [ ${cpu} = "native" ] ; then
+ time sh -x ${doOne} -n >native.log 2>&1
+ if [ $? -ne 0 ] ; then
+ echo NATIVE FAILED!!! BAILING
+ exitStatus=1
+ break
+ fi
+ else
+ # Everything
+ time sh -x ${doOne} -v -A ${tests} ${cpu} ${bsp} >${bsp}.log 2>&1
+ # Just C
+ #time sh -x ${doOne} -v -b -D -1 -r ${tests} ${cpu} ${bsp} >${bsp}.log 2>&1
+ # Just C/C++
+ #time sh -x ${doOne} -v -1 -r -g ${tests} ${cpu} ${bsp} >${bsp}.log 2>&1
+ fi
+ echo $?
+done
+
+
+stopped=`date`
+echo Started at: ${start}
+echo Stopped at: ${stopped}
+exit $exitStatus
diff --git a/do_one b/do_one
new file mode 100755
index 0000000..4332312
--- /dev/null
+++ b/do_one
@@ -0,0 +1,573 @@
+#! /bin/sh
+#
+# Execution Times (for sparc-rtems${RTEMS_VERSION})
+#
+# - building native - 45m43.697s
+# - building stage1 (non-multilib) - 7m26.749s
+# - building stage1 (multilib) -
+# - building Ada stack (non-multilib) - 13m25.945s
+# - building RTEMS - 12m27.799s
+# - Running ACAT (sis) -
+# - Running GCC Test Suite (sis) - 60m26.523s
+#
+# Computer Info
+# Fedora 8 on Intel Core2 Duo T7500 @ 2.20GHz w/ 2GB RAM
+
+vfile=`dirname $0`/VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+
+
+######################## Set defaults #############################
+# Remove Build Directories
+do_cleanup=yes
+# Install Binutils (from rpm or source)
+do_binutils=no
+ do_binutils_method=source
+# Install GDB (from rpm or source)
+do_gdb=no
+ do_gdb_method=source
+# Build the native compiler?
+do_native=no
+ do_native_ada=yes
+# Build the base level cross compiler. C++ and multilib are optional.
+do_stage1=no
+ do_cxx=yes
+ do_multilib=yes
+# Build the Ada language cross compiler. Multilib is NOT supported
+do_ada=no
+ do_ada_multilib=yes
+# Build RTEMS for a particular CPU/BSP combination
+do_rtems=no
+# Which test suites do we attempt
+run_gcctests=no
+run_acats=no
+# Do we send email to gcc-testresults with the test results?
+do_mail=yes
+# Are we noisy when running?
+verbose=no
+######################## Parse arguments ###########################
+
+usage()
+{
+cat <<EOF
+ -A - binutils, stage 1, C++, C/C++ multilib, Ada, RTEMS
+ -T - run GCC and Ada tests
+ -b - install binutils (from source or copy installed RPM contents)
+ -D - install gdb (from source or copy installed RPM contents)
+ -n - native compiler
+ -1 - stage 1 C/C++ compiler
+ -c - do not include C++
+ -m - do not build multilib
+ -a - stage 2 Ada compiler
+ -r - build RTEMS
+ -g - run GCC C/C++ tests
+ -C - run ACATS
+ -d - do not clean up (delete build directories)
+ -v - verbose
+ -M - do NOT email test results to gcc-testresults
+EOF
+}
+
+fatal()
+{
+ usage
+ exit 1
+}
+
+while getopts bdDnv1cmargCATM OPT
+do
+ case "$OPT" in
+ A) do_binutils="yes"
+ do_gdb="yes"
+ do_stage1="yes"
+ do_cxx="yes"
+ do_multilib="yes"
+ do_ada="yes"
+ do_rtems="yes"
+ ;;
+ d) do_cleanup="no" ;;
+ D) do_gdb="yes" ;;
+ T) run_gcctests="yes"
+ run_acats="yes"
+ ;;
+ # unrpm binutils
+ b) do_binutils="yes" ;;
+ # Build the native
+ n) do_native="yes";;
+ # Stage 1 arguments
+ 1) do_stage1="yes";;
+ c) do_cxx="no";;
+ m) do_multilib="no";;
+ # Stage 2 arguments
+ a) do_ada="yes" ;;
+ # Build RTEMS
+ r) do_rtems="yes" ;;
+ # Testsuites to run
+ g) run_gcctests="yes" ;;
+ C) run_acats="yes" ;;
+ v) verbose="yes";;
+ M) do_mail="no";;
+ *) fatal;;
+ esac
+done
+
+########################### Grab CPU/BSP ###########################
+
+shiftcount=`expr $OPTIND - 1`
+shift $shiftcount
+
+cpu=${1}
+bsp=${2}
+
+case ${cpu} in
+ m32c)
+ do_ada=no
+ do_cxx=no
+ run_acats=no
+ echo M32C does not support C++ or Ada
+ ;;
+ *);;
+esac
+
+if [ ${verbose} = yes ] ; then
+ echo "Target : " ${cpu}
+ echo "BSP : " ${bsp}
+ echo "Binutils : " ${do_binutils}
+ echo "GDB : " ${do_gdb}
+ echo "Build Native : " ${do_native}
+ echo "Build Stage 1 : " ${do_stage1}
+ echo " C++ : " ${do_cxx}
+ echo " Multilib : " ${do_multilib}
+ echo "Stage 2 : " ${do_ada}
+ echo " Ada : " ${do_ada}
+ echo " Multilib : " ${do_ada_multilib}
+ echo "Build RTEMS : " ${do_rtems}
+ echo "Run GCC Tests : " ${run_gcctests}
+ echo "Run ACATS : " ${run_acats}
+ echo "Email Tests : " ${do_mail}
+ echo "Native GCC : " `type gcc`
+ echo "PATH : " ${PATH}
+ echo "Clean up : " ${do_cleanup}
+fi
+
+# Should the user have specified a CPU and/or BSP?
+needBSP=no
+needCPU=no
+
+if [ ${do_binutils} = yes -o ${do_gdb} = yes -o \
+ ${do_stage1} = yes -o ${do_ada} = yes ] ; then
+ needCPU=yes
+fi
+
+if [ ${do_rtems} = yes -o ${run_gcctests} = yes -o ${run_acats} = yes ] ; then
+ needBSP=yes
+ needCPU=yes
+ if [ x${bsp} = x ] ; then
+ echo "BSP NOT SET"
+ fatal
+ fi
+fi
+
+if [ ${needCPU} = yes -a x${cpu} = x ] ; then
+ echo "CPU NOT SET"
+ fatal
+fi
+
+if [ ${needBSP} = yes -a x${bsp} = x ] ; then
+ echo "BSP NOT SET"
+ fatal
+fi
+
+TARGET=${cpu}-rtems${RTEMS_VERSION}
+
+######### Consistency check installation of source
+
+if [ ! -d ${GCCDIR}/newlib ] ; then
+ echo "${GCCDIR}/newlib not present"
+ exit 1
+fi
+
+ADASCRIPTDIR=${SCRIPTDIR}/gcc/testsuite/ada/acats
+for i in Makefile.rtems rtems_acats_reasons rtems_acats_status \
+ rtems_generate_acats_email rtems_init.c run_all_rtems.sh
+do
+ if [ ! -r ${ADASCRIPTDIR}/${i} ] ; then
+ echo "${ADASCRIPTDIR}/gcc/testsuite/ada/acats/${i} not present"
+ echo "RTEMS ACATS support files not present"
+ exit 1
+ fi
+done
+
+if [ ${needCPU} = yes -a ${needBSP} = yes ] ; then
+ DEJADIR=${SCRIPTDIR}/dejagnu/boards
+ if [ ! -d ${DEJADIR} ] ; then
+ echo "Missing DejaGNU configuration directory (${DEJADIR})"
+ exit 1
+ fi
+
+ case ${cpu}-${bsp} in
+ arm-edb7312) dejacfg=rtems-arm-edb7312 ;;
+ bfin-eZKit533) dejacfg=rtems-bfin-nosim ;;
+ h8300-h8sim) dejacfg=rtems-h8300-h8sim ;;
+ i386-pc386|i386-qemu) dejacfg=rtems-i386-qemu ;;
+ m68k-mcf5206elite) dejacfg=rtems-m68k-nosim ;;
+ m32c-m32csim) dejacfg=rtems-m32c-m32csim ;;
+ mips-jmr3904) dejacfg=rtems-mips-jmr3904 ;;
+ powerpc-psim) dejacfg=rtems-powerpc-psim ;;
+ sh-simsh1) dejacfg=rtems-sh-simsh1 ;;
+ sparc-sis) dejacfg=rtems-sparc-sis ;;
+ *)
+ echo "ERROR ${bsp} is not known to DegaGNU"
+ exit 1
+ ;;
+ esac
+
+ if [ ! -r ${DEJADIR}/${dejacfg}.exp ] ; then
+ echo "Missing DejaGNU file for ${cpu}/${bsp}"
+ exit 1
+ fi
+fi
+######### END OF Consistency check installation of source
+
+######### Log Directory
+if [ ! -d ${LOGDIR} ] ; then
+ mkdir ${LOGDIR}
+fi
+#########
+
+######### Install binutils
+j_binutils()
+{
+ test -d ${INSTALL} || mkdir -p ${INSTALL}
+
+ cd ${INSTALL}/..
+
+ case ${do_binutils_method} in
+ rpm)
+ if [ ! -r /opt/rtems-${RTEMS_VERSION}/bin/${TARGET}-as ] ; then
+ echo "Binutils RPMs not installed"
+ exit 0
+ fi
+
+ echo "Extracting binutils from installed RPMs"
+ DIR=`pwd`
+ mkdir tmp-unrpm
+ cd tmp-unrpm
+ cd /
+ for cpu in $*
+ do
+ pkg=`rpm -qf /opt/rtems-${RTEMS_VERSION}/bin/${TARGET}-as`
+ rpm -ql $pkg | cpio -pvdum ${DIR}/tmp-unrpm
+ done
+ cd ${DIR}/tmp-unrpm/opt/rtems-${RTEMS_VERSION}
+ find . | cpio -pdum ${INSTALL}
+ cd ${DIR}
+ rm -rf tmp-unrpm
+ ;;
+ source)
+ echo "Building Binutils from source"
+ rm -rf b-binutils-${cpu}
+ mkdir b-binutils-${cpu}
+ cd b-binutils-${cpu}
+ (${BINUTILSDIR}/configure --target=${TARGET} --prefix=$INSTALL && \
+ make -j3 && make install) >${LOGDIR}/${cpu}-binutils.log 2>&1
+ if [ $? -ne 0 ] ; then
+ echo "Failed to build Binutils from source"
+ exit 1
+ fi
+ cd ..
+ test ${do_cleanup} = "yes" && rm -rf b-binutils-${cpu}
+ ;;
+ *)
+ echo "Where do I get the binutils from?"
+ exit 1
+ ;;
+ esac
+}
+
+if [ ${do_binutils} = yes ] ; then
+ echo "Building binutils..."
+ j_binutils ${cpu}
+fi
+
+######### Install gdb
+j_gdb()
+{
+set -x
+ test -d ${INSTALL} || mkdir -p ${INSTALL}
+
+ cd ${INSTALL}/..
+
+ case ${cpu} in
+ mips) GDBTARGET=${cpu}tx39-rtems${RTEMS_VERSION} ;;
+ *) GDBTARGET=${TARGET} ;;
+ esac
+
+ case ${do_gdb_method} in
+ rpm)
+ if [ ! -r /opt/rtems-${RTEMS_VERSION}/bin/${GDBTARGET}-gdb ] ; then
+ echo "Binutils RPMs not installed"
+ exit 0
+ fi
+
+ echo "Extracting gdb from installed RPMs"
+ DIR=`pwd`
+ mkdir tmp-unrpm
+ cd tmp-unrpm
+ cd /
+ for cpu in $*
+ do
+ pkg=`rpm -qf /opt/rtems-${RTEMS_VERSION}/bin/${GDBTARGET}-gdb`
+ rpm -ql $pkg | cpio -pvdum ${DIR}/tmp-unrpm
+ done
+ cd ${DIR}/tmp-unrpm/opt/rtems-${RTEMS_VERSION}
+ find . | cpio -pdum ${INSTALL}
+ cd ${DIR}
+ rm -rf tmp-unrpm
+ ;;
+ source)
+ echo "Building GDB from source"
+ cd ${BASEDIR}
+ rm -rf b-gdb-${cpu}
+ mkdir b-gdb-${cpu}
+ cd b-gdb-${cpu}
+ (${GDBDIR}/configure --target=${GDBTARGET} \
+ --enable-sim --enable-sim-hardware \
+ --enable-timebase --enable-sim-trace --prefix=$INSTALL && \
+ make -j3 && make install) >${LOGDIR}/${cpu}-gdb.log 2>&1
+ if [ $? -ne 0 ] ; then
+ echo "Failed to build gdb from source"
+ exit 1
+ fi
+ cd ..
+ test ${do_cleanup} = "yes" && rm -rf b-gdb-${cpu}
+ ;;
+ *)
+ echo "Where do I get the gdb from?"
+ exit 1
+ ;;
+ esac
+}
+
+if [ ${do_gdb} = yes ] ; then
+ echo "Building gdb..."
+ j_gdb ${cpu}
+fi
+
+######### Build a native compiler
+j_native()
+{
+ test ${do_native_ada} = "yes" && AdaArg=",ada"
+ ${GCCDIR}/configure \
+ --enable-languages=c${AdaArg} --prefix=$INSTALL &&
+ make -j3 && make install
+}
+
+if [ ${do_native} = "yes" ] ; then
+ echo "Building native compiler..."
+ (cd ${BASEDIR} && \
+ rm -rf b-native && \
+ mkdir b-native && \
+ cd b-native && \
+ time j_native >${LOGDIR}/native.log 2>&1 && cd .. ) || exit 1
+ test ${do_cleanup} = "yes" && rm -rf b-native
+else
+ echo Skipping native
+fi
+# END of build native compiler
+
+######### Build Cross C/C++ baseline compiler
+j_gcc1()
+{
+
+ if [ X${1} = X ] ; then
+ echo Usage: $0 TARGET_CPU
+ exit 1
+ fi
+
+ if [ ! -d ${INSTALL} ]; then
+ echo ${INSTALL} does not exist
+ exit 1
+ fi
+
+ if [ ${verbose} = yes ] ; then
+ echo "Cross Assembler ==>" `type ${TARGET}-as`
+ fi
+
+ if [ ${do_cxx} = yes ] ; then
+ cxx=",c++"
+ fi
+ if [ ${do_multilib} = yes ] ; then
+ multilib="--enable-multilib"
+ else
+ multilib="--disable-multilib"
+ fi
+
+ ${GCCDIR}/configure \
+ --enable-threads=rtems --with-gnu-as ${multilib} \
+ --enable-newlib-mb --enable-newlib-iconv \
+ --with-gnu-ld --with-newlib --verbose --with-system-zlib --disable-nls \
+ --enable-version-specific-runtime-libs \
+ --enable-languages=c${cxx} --target=$TARGET --prefix=$INSTALL &&
+ make -j3 &&
+ make install
+}
+
+if [ ${do_stage1} = "yes" ] ; then
+ echo "Building Stage 1 compiler (C/C++)..."
+ (cd ${BASEDIR} && \
+ rm -rf b-gcc1-${cpu} && \
+ mkdir b-gcc1-${cpu} && \
+ cd b-gcc1-${cpu} && \
+ time j_gcc1 ${cpu} >${LOGDIR}/${cpu}-stage1.log 2>&1 && cd ..) || exit 1
+else
+ echo Skipping Stage 1 for ${cpu}
+fi
+
+#################### RTEMS
+
+j_rtems()
+{
+ cpuArg=$1
+ bspArg=$2
+ bspdir=b-${cpuArg}-${bspArg}
+
+ cd ${BASEDIR}
+ rm -rf ${bspdir}
+ mkdir ${bspdir} || exit 1
+ cd ${bspdir} || exit 1
+
+ case $bspArg in
+ multilib)
+ ENABLE_BSP="--enable-multilib"
+ ;;
+ qemu|pc386)
+ ENABLE_BSP="--enable-rtemsbsp=pc386"
+ ENABLE_BSP="${ENABLE_BSP} USE_COM1_AS_CONSOLE=1"
+ ENABLE_BSP="${ENABLE_BSP} BSP_PRESS_KEY_FOR_RESET=0"
+ ;;
+ *)
+ ENABLE_BSP="--enable-rtemsbsp=${bspArg}"
+ ;;
+ esac
+ case ${cpu} in
+ m32c) RTEMS_ARGS="--disable-ada --disable-posix --disable-networking" ;;
+ *) RTEMS_ARGS="--enable-ada --enable-posix --enable-networking" ;;
+ esac
+ ${RTEMSDIR}/configure --target=${TARGET} ${ENABLE_BSP} \
+ ${RTEMS_ARGS} --enable-maintainer-mode --disable-tests \
+ --prefix=${BSP_INSTALL} && make -j3 && make install
+ cd ..
+}
+
+if [ ${do_rtems} = "yes" ] ; then
+ echo "Building RTEMS for ${cpu} ${bsp} ..."
+ #time j_rtems ${cpu} multilib >${LOGDIR}/${cpu}-rtems-multilib.log 2>&1 || \
+ # exit 1
+ time j_rtems ${cpu} ${bsp} >${LOGDIR}/${cpu}-rtems-${bsp}.log 2>&1 || \
+ exit 1
+ test ${do_cleanup} = "yes" && rm -rf b-${cpu}-${bsp} b-${cpu}-multilib
+else
+ echo Skipping RTEMS for ${cpu}/${bsp}
+fi
+pwd
+
+##### Do the gcc tests
+if [ ${run_gcctests} = "yes" ] ; then
+ echo "Running GCC Tests..."
+ cd ${BASEDIR}/b-gcc1-${cpu} || exit 1
+ time sh -x ${SCRIPTDIR}/rundeja ${bsp} \
+ >${LOGDIR}/${cpu}-gcctests-${bsp}.log 2>&1
+
+ if [ ${do_mail} = "yes" ] ; then
+ echo Sending test results to GCC community..
+ ${GCCDIR}/contrib/test_summary -m gcc-testresults@gcc.gnu.org | sh
+ if [ $? -ne 0 ] ; then
+ echo "Failed to email GCC Test Results .. bailing"
+ exit 1
+ fi
+ fi
+ cd .. || exit 1
+else
+ echo Skipping GCC DejaGNU tests for ${cpu}/${bsp}
+fi
+test ${do_cleanup} = "yes" && rm -rf b-gcc1-${cpu}
+
+##### Build an Ada compiler now that we have a cross installed
+j_gcc2()
+{
+ if [ X${1} = X ] ; then
+ echo Usage: $0 TARGET_CPU
+ exit 1
+ fi
+ TARGET=${1}-rtems${RTEMS_VERSION}
+
+ if [ ! -d ${INSTALL} ]; then
+ echo ${INSTALL} does not exist
+ exit 1
+ fi
+
+ if [ ${verbose} = yes ] ; then
+ echo "Cross GCC ==>" `type ${TARGET}-gcc`
+ fi
+
+ if [ ${do_ada_multilib} = yes ] ; then
+ ada_multilib="--enable-multilib"
+ else
+ ada_multilib="--disable-multilib"
+ fi
+
+# CFLAGS_FOR_TARGET=-B${BSP_INSTALL}/${TARGET}/${bsp}/lib/
+
+ ${GCCDIR}/configure \
+ --enable-threads=rtems --with-gnu-as ${ada_multilib} \
+ --enable-newlib-mb --enable-newlib-iconv \
+ --with-gnu-ld --with-newlib --verbose --with-system-zlib --disable-nls \
+ CFLAGS_FOR_TARGET=-B${BSP_INSTALL}/${TARGET}/${bsp}/lib/ \
+ --enable-version-specific-runtime-libs \
+ --enable-languages=c,ada --target=$TARGET --prefix=$INSTALL &&
+ make -j3 &&
+ make install
+}
+
+if [ ${do_ada} = "yes" ] ; then
+ echo "Building Stage 2 cross Ada compiler for ${1} ..."
+ (cd ${BASEDIR} && \
+ rm -rf b-gcc2-${cpu} && \
+ mkdir b-gcc2-${cpu} && \
+ cd b-gcc2-${cpu} && \
+ time j_gcc2 ${cpu} >${LOGDIR}/${cpu}-stage2.log 2>&1 && cd ..) || exit 1
+else
+ echo Skipping Stage 2 Ada for ${cpu}
+fi
+
+#### Run the Ada ACATS tests
+if [ ${run_acats} = "yes" -a -d b-gcc2-${cpu} ] ; then
+ echo "Running ACATS..."
+ cd ${GCCDIR}/gcc/testsuite/ada/acats/ || exit 1
+
+ time ${ADASCRIPTDIR}/run_all_rtems.sh ${INSTALL} ${BSP_INSTALL} \
+ ${TARGET} ${bsp} >${LOGDIR}/${cpu}-acats-${bsp}-build.log 2>&1
+ if [ -r work-${bsp}/acats.log ] ; then
+ cp work-${bsp}/acats.log ${LOGDIR}/${cpu}-acats-${bsp}.log
+ fi
+
+ if [ ${do_mail} = "yes" ] ; then
+ echo Sending ACATS test results to GCC community..
+ ${ADASCRIPTDIR}/rtems_generate_acats_email ${cpu} ${bsp} yes
+ fi
+
+ cd ../../../../.. || exit 1
+else
+ echo Skipping ACATS for ${cpu}
+fi
+
+if [ ${do_ada} = "yes" ] ; then
+ test ${do_cleanup} = "yes" && rm -rf b-gcc2-${cpu}
+fi
+exit 0
diff --git a/do_tests b/do_tests
new file mode 100644
index 0000000..88c3985
--- /dev/null
+++ b/do_tests
@@ -0,0 +1,21 @@
+#
+#
+#
+
+gcc=gcc
+prefix=/home/joel/work-gnat/svn/install
+target=powerpc-rtems4.10
+bsp=psim
+tmpdir=/home/joel/work-gnat/svn/install/../gcctests-${bsp}
+
+cd ${gcc}
+rm -f site.exp
+sh -x ./contrib/test_installed \
+ --target=${target} \
+ --target_board=rtems-${bsp} \
+ --with-gcc=${prefix}/bin/${target}-gcc \
+ --without-g++ \
+ --without-gfortran \
+ --without-objc \
+ --tmpdir=${tmpdir}
+
diff --git a/gcc/testsuite/ada/acats/Makefile.rtems b/gcc/testsuite/ada/acats/Makefile.rtems
new file mode 100644
index 0000000..48a2005
--- /dev/null
+++ b/gcc/testsuite/ada/acats/Makefile.rtems
@@ -0,0 +1,83 @@
+#
+# Makefile for ACATS -- Helps pull BSP specific information
+# into a form the script can use
+#
+
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+
+include $(RTEMS_CUSTOM)
+include $(PROJECT_ROOT)/make/leaf.cfg
+
+# Tool helpers
+rtemsdir=${RTEMS_MAKEFILE_PATH}
+GNATMAKE=$(AS:as=gnatmake)
+GNATCHOP=$(AS:as=gnatchop)
+CARGS = -B${rtemsdir}/lib/ -specs bsp_specs -qrtems
+CARGS += $(CPU_CFLAGS) $(LDFLAGS) $(AM_LDFLAGS)
+
+all: RTEMS_SETTINGS rtems_init.o
+
+rtems_init.o: ${ADASCRIPTDIR}/rtems_init.c
+ $(CC) $(CFLAGS) -c ${ADASCRIPTDIR}/rtems_init.c
+
+RTEMS_SETTINGS: stamp-targetrun stamp-targetgcc \
+ stamp-targetchop stamp-targetmake
+ cat $? >RTEMS_SETTINGS
+
+stamp-targetrun:
+ echo "target_run() {" >$@
+ ifeq ($(RTEMS_BSP),pc386)
+ echo " runqemu -l 60 -c $$"'*' >> $@
+ endif # pc386
+ ifeq ($(RTEMS_BSP),jmr3904)
+ echo " jmr3904-4.10 -l 240 $$"'*' >> $@
+ endif # jmr3904
+ ifeq ($(RTEMS_BSP),psim)
+ echo " psim-4.10 -l 180 $$"'*' >> $@
+ endif # psim
+ ifeq ($(RTEMS_BSP),erc32)
+ echo " runerc32 -c $$"'*' >> $@
+ endif # erc32
+ ifeq ($(RTEMS_BSP),sis)
+ echo " sis-4.10 -l 180 $$"'*' >> $@
+ endif # sis
+ ifeq ($(RTEMS_BSP),edb7312)
+ echo " edb7312 -l 180 $$"'*' >> $@
+ endif # edb7312
+ ifeq ($(RTEMS_BSP),simsh1)
+ echo " simsh1-4.10 -l 60 $$"'*' >> $@
+ endif # simsh1
+ ifeq ($(RTEMS_BSP),h8sim)
+ echo " h8sim-4.10 -l 60 $$"'*' >> $@
+ endif # h8sim
+ ifeq ($(RTEMS_BSP),mcf5206elite)
+ echo " nosim $$"'*' >> $@
+ endif # mcf5206elite
+ ifeq ($(RTEMS_BSP),eZKit533)
+ echo " nosim $$"'*' >> $@
+ endif # mcf5206elite
+ echo "}" >>$@
+
+stamp-targetgcc:
+ echo "target_gcc() {" >$@
+ echo " $(CC) $$"'*' >> $@
+ echo "}" >>$@
+
+stamp-targetchop:
+ echo "target_gnatchop() {" >$@
+ echo " $(GNATCHOP) $$"'*' >> $@
+ echo "}" >>$@
+
+stamp-targetmake:
+ echo "target_gnatmake() {" >$@
+ echo "set -x" >>$@
+ echo ' $(GNATMAKE) -fstack-check -v -O $$gnatflags $$gccflags $$* -bargs -Mgnat_main -largs $(CARGS) '$(shell pwd)/rtems_init.o' $$EXTERNAL_OBJECTS' >> $@
+ echo "}" >>$@
+
+# $(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g \
+# -bargs -Mgnat_main \
+# -largs $(CARGS) rtems_init.o
+# $(SIZE) $(MAIN)
+
+clean:
+ rm -f b~$(MAIN).* *.o *.ali $(MAIN) stamp-*
diff --git a/gcc/testsuite/ada/acats/rtems_acats_reasons b/gcc/testsuite/ada/acats/rtems_acats_reasons
new file mode 100644
index 0000000..1e4d369
--- /dev/null
+++ b/gcc/testsuite/ada/acats/rtems_acats_reasons
@@ -0,0 +1,78 @@
+# ACATS Tests which are near constant
+all:ce2108f: simulator does not have persistent files
+all:ce2108h: simulator does not have persistent files
+all:ce3112d: simulator does not have persistent files
+
+# GCC Ada PRs:
+PR:37094: in copyprop_hardreg_forward_1, at regrename.c:1589
+
+# Last updated: 30 July 2008
+sis:cxg2005: FP exception - SIS simulator is not accurate enough
+sis:cxg2012: FP exception - SIS simulator is not accurate enough
+sis:cxg2014: FP exception - SIS simulator is not accurate enough
+sis:cxg2017: FP exception - SIS simulator is not accurate enough
+sis:cxg2020: FP exception - SIS simulator is not accurate enough
+sis:c37213j: address exception
+sis:c37213k: alignment exception
+sis:c47007a: alignment exception
+sis:c47009a: alignment exception
+sis:c953002: ran too long, may eventually finish
+
+# Last updated: 30 July 2008
+pc386:a71004a: ran too long, no output
+pc386:c64005c: WRONG ITERATIVE TRACE LENGTH.
+pc386:c64005d: WRONG I:RATIVE TRACE LENGTH.
+pc386:c95065c: ran too long, no output
+pc386:c95085m: ran too long, no output
+pc386:c953002: ran too long, some output
+pc386:cc3305a: ran too long, no output
+pc386:cxg2002: FPU precision issue on qemu
+pc386:cxg2003: FPU precision issue on qemu
+pc386:cxg2004: FPU precision issue on qemu
+pc386:cxg2006: FPU precision issue on qemu
+pc386:cxg2007: FPU precision issue on qemu
+pc386:cxg2010: FPU precision issue on qemu
+pc386:cxg2011: FPU precision issue on qemu
+pc386:cxg2012: FPU precision issue on qemu
+pc386:cxg2013: FPU precision issue on qemu
+pc386:cxg2014: ran too long, some output
+pc386:cxg2015: FPU precision issue on qemu
+pc386:cxg2016: FPU precision issue on qemu
+pc386:cxg2017: FPU precision issue on qemu
+pc386:cxg2018: FPU precision issue on qemu
+pc386:cxg2019: FPU precision issue on qemu
+pc386:cxg2020: FPU precision issue on qemu
+pc386:cxg2021: FPU precision issue on qemu
+
+# Last updated: 30 July 2008
+jmr3904:c380004: read from bad address
+jmr3904:c64005c: WRONG ITERATIVE TRACE LENGTH.
+jmr3904:c64005d: WRONG ITERATIVE TRACE LENGTH.
+jmr3904:ca11012: Incorrect results from complex operation. Exception not raised in child package.
+jmr3904:cdd2a02: CONSTRAINT_ERROR range check failed
+jmr3904:cxf3a01: read from bad address
+jmr3904:cxf3a02: read from bad address
+
+# Last updated: 30 July 2008
+psim:c41328a: INCORRECT RESULTS FROM DERIVED SUBPROGRAM - 3.
+psim:c64005c: WRONG ITERATIVE TRACE LENGTH.
+psim:c64005d: WRONG ITERATIVE TRACE LENGTH.
+
+# Last updated: 25 September 2008
+simsh1:a22006c: Memory exception at ffc2b4bc (illegal address)
+simsh1:c380004: Memory exception at 44000 (illegal address)
+simsh1:c45532m: raised CONSTRAINT_ERROR : c45532m.adb:143 range check failed
+simsh1:c45532o: raised CONSTRAINT_ERROR : c45532o.adb:147 range check failed
+simsh1:c45532p: raised CONSTRAINT_ERROR : c45532p.adb:141 range check failed
+simsh1:c953002: Memory exception at 44000 (illegal address)
+simsh1:c974013: Memory exception at 44000 (illegal address)
+simsh1:cd1c04e: explicit fail THE VALUES OF DERIVED_TYPE COMPONENTS WERE INCORRECT.
+simsh1:cxa4009: explicit fail Incorrect results
+simsh1:cxa4020: explicit fail Incorrect results
+simsh1:cxg2018: Memory exception at 44000 (illegal address)
+simsh1:cxg2019: Memory exception at 44000 (illegal address)
+simsh1:cxg2021: Memory exception at 44000 (illegal address)
+
+
+
+
diff --git a/gcc/testsuite/ada/acats/rtems_acats_status b/gcc/testsuite/ada/acats/rtems_acats_status
new file mode 100755
index 0000000..0dfb2da
--- /dev/null
+++ b/gcc/testsuite/ada/acats/rtems_acats_status
@@ -0,0 +1,52 @@
+#! /bin/sh
+#
+# Report ACATS status summary
+#
+# $Id$
+#
+
+if [ $# -ne 2 -a $# -ne 3 ] ; then
+ echo Usage $0: CPU BSP [seconds]
+ exit 1
+fi
+
+vfile=`dirname $0`/../../../../VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+
+CPU=$1
+BSP=$2
+if [ $# -eq 3 ] ; then
+ seconds=$3
+else
+ seconds=0
+fi
+
+DIR=${GCCDIR}/gcc/testsuite/ada/acats
+if [ ! -d ${DIR} ] ; then
+ echo "No Ada build directory for the BSP (${DIR})"
+ exit 1
+fi
+
+cd ${DIR}
+if [ ! -d work-${BSP} ] ; then
+ echo "No ACATS working directory for the BSP (${BSP})"
+ exit 1
+fi
+
+
+while true
+do
+ printf "PASSED: %4d FAILED %4d\n" \
+ `grep ^PASS work-${BSP}/acats.sum | wc -l` \
+ `grep ^FAIL work-${BSP}/acats.sum | wc -l`
+ if [ ${seconds} -eq 0 ] ; then
+ break
+ fi
+ sleep ${seconds}
+done
+exit 0
diff --git a/gcc/testsuite/ada/acats/rtems_generate_acats_email b/gcc/testsuite/ada/acats/rtems_generate_acats_email
new file mode 100755
index 0000000..95cc37d
--- /dev/null
+++ b/gcc/testsuite/ada/acats/rtems_generate_acats_email
@@ -0,0 +1,121 @@
+#! /bin/sh
+#
+# Generate ACATS Email
+#
+# $Id$
+#
+
+if [ $# -ne 3 ] ; then
+ echo Usage $0: CPU BSP domail
+ exit 1
+fi
+
+vfile=`dirname $0`/../../../../VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+domail=$3
+BSP=$2
+CPU=$1
+rtemsVersion=4.10
+Target=${CPU}-rtems${rtemsVersion}
+
+DIR=${GCCDIR}/gcc/testsuite/ada/acats
+if [ ! -d ${DIR} ] ; then
+ echo "No Ada build directory for the BSP (${DIR})"
+ exit 1
+fi
+
+cd ${DIR}
+if [ ! -d work-${BSP} ] ; then
+ echo "Usage No ACATS working directory for the BSP (${BSP})"
+ exit 1
+fi
+
+f=work-${BSP}/acats.sum
+logfile=work-${BSP}/acats.log
+if [ ! -r ${f} ] ; then
+ echo "Usage No ACATS summary file working directory for the BSP (${BSP})"
+ exit 1
+fi
+
+${CPU}-rtems${rtemsVersion}-gcc --version >/dev/null 2>&1
+if [ ${?} -ne 0 ] ; then
+ echo "${CPU}-rtems${rtemsVersion}-gcc not found"
+ exit 1
+fi
+
+get_count()
+{
+ fileIn=${1}
+ shift
+ grep "${*}" <${fileIn}
+}
+
+
+cp /dev/null LOGS.tmp
+
+get_failed()
+{
+ grep "^${2}" <${1} | while read l
+ do
+ Test=`echo ${l} | cut -d':' -f2 | tr -d '[:blank:]'`
+ LowTest=`echo ${l} | cut -d':' -f2 | tr '[:upper:]' '[:lower:]'`
+ Reason=`grep "[${BSP}|all]:${Test}" ${REASONS}`
+ if [ $? -eq 0 ] ; then
+ Reason=`echo ${Reason} | cut -d':' -f3- | sed -e 's/^ //'`
+ else
+ grep "Error detected.*${Test}" ${logfile} >/dev/null
+ if [ $? -eq 0 ] ; then
+ Reason="GNAT BUG DETECTED -- follow up required"
+ else
+ Reason="unknown reason for failure"
+ fi
+ #( echo "==================== ${LowTest}.log ====================" ; \
+ # cat `find work-${BSP} -name ${LowTest}.log` ; \
+ # echo "========================================================" \
+ #) >> LOGS.tmp
+ fi
+ echo "${Test} - ${Reason}"
+ done
+}
+
+gen_report()
+{
+ echo
+ ${CPU}-rtems${rtemsVersion}-gcc --version | head -1
+ echo
+
+ echo " === acats Summary ==="
+ get_count ${f} '# of expected passes'
+ get_count ${f} '# of unexpected failures'
+ get_count ${f} '# of unsupported tests'
+
+ echo
+ get_failed ${f} 'UNSUPPORTED'
+ get_failed ${f} 'FAIL'
+
+ echo
+ echo "======= Logs for failed tests ======"
+ cat LOGS.tmp
+}
+
+REASONS=${SCRIPTDIR}/gcc/testsuite/ada/acats/rtems_acats_reasons
+
+if [ ! -r ${REASONS} ] ; then
+ echo "Cannot find rtems_acats_reasons (${REASONS})"
+ exit 1
+fi
+
+if [ ${domail} = "yes" ] ; then
+ gccver=`${CPU}-rtems${rtemsVersion}-gcc --version | head -1 | cut -d' ' -f4-`
+ gen_report | joelmail \
+ -s "ACATS results for ${gccver} on ${CPU}-rtems${rtemsVersion}" \
+ gcc-testresults@gcc.gnu.org
+
+else
+ gen_report
+fi
diff --git a/gcc/testsuite/ada/acats/rtems_init.c b/gcc/testsuite/ada/acats/rtems_init.c
new file mode 100644
index 0000000..981899a
--- /dev/null
+++ b/gcc/testsuite/ada/acats/rtems_init.c
@@ -0,0 +1,121 @@
+/*
+ * COPYRIGHT (c) 1989-1997.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may be found in
+ * the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * $Id$
+ */
+
+#include <bsp.h>
+
+#include <assert.h>
+#include <pthread.h>
+#include <stdlib.h>
+
+#include <sys/stat.h>
+#include <sys/types.h>
+
+extern rtems_configuration_table BSP_Configuration;
+
+#ifdef GNAT_PID
+#include <unistd.h>
+pid_t getpid()
+{
+ return GNAT_PID;
+}
+#endif
+
+/*
+ * By having the POSIX_Init thread create a second thread just
+ * to invoke gnat_main, we can override all default attributes
+ * of the "Ada environment task". Otherwise, we would be
+ * stuck with the defaults set by RTEMS.
+ */
+
+void *start_gnat_main( void * argument )
+{
+ extern int gnat_main ( int argc, char **argv, char **envp );
+
+ (void) gnat_main ( 0, 0, 0 );
+
+ exit( 0 );
+
+ return 0;
+}
+
+size_t _ada_pthread_minimum_stack_size()
+{
+ return 20 * 1024;
+}
+
+void *POSIX_Init( void *argument )
+{
+ pthread_t thread_id;
+ pthread_attr_t attr;
+ size_t stacksize = _ada_pthread_minimum_stack_size();
+ int status;
+
+ /* ACATS needs /tmp */
+ mkdir( "/tmp", 0777 );
+
+ status = pthread_attr_init( &attr );
+ assert( !status );
+
+#define GNAT_MAIN_STACKSPACE 100
+#ifdef GNAT_MAIN_STACKSPACE
+ stacksize = GNAT_MAIN_STACKSPACE * 1024;
+#else
+#define GNAT_MAIN_STACKSPACE 0
+#endif
+
+ status = pthread_attr_setstacksize( &attr, stacksize );
+ assert( !status );
+
+ status = pthread_create( &thread_id, &attr, start_gnat_main, NULL );
+ assert( !status );
+
+ pthread_exit( 0 );
+
+ return 0;
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
+
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_MAXIMUM_SEMAPHORES 10
+#define CONFIGURE_GNAT_RTEMS
+#define CONFIGURE_MAXIMUM_ADA_TASKS 40
+#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0
+
+/* Some of the ACATS tests assume a real filesystem */
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
+
+#define CONFIGURE_MEMORY_OVERHEAD (GNAT_MAIN_STACKSPACE)
+/*
+#define CONFIGURE_MEMORY_OVERHEAD (256 + GNAT_MAIN_STACKSPACE)
+*/
+
+#define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY 1
+/* #define CONFIGURE_MALLOC_DIRTY */
+#define STACK_CHECKER_ON
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+#if defined(__mips__)
+/* GCC sometimes expects this on the mips */
+void _flush_cache()
+{
+}
+#endif
diff --git a/gcc/testsuite/ada/acats/run_all_rtems.sh b/gcc/testsuite/ada/acats/run_all_rtems.sh
new file mode 100755
index 0000000..1381dd7
--- /dev/null
+++ b/gcc/testsuite/ada/acats/run_all_rtems.sh
@@ -0,0 +1,405 @@
+#!/bin/sh
+# Run ACATS with the GNU Ada compiler
+
+# The following functions are to be customized if you run in cross
+# environment or want to change compilation flags. Note that for
+# tests requiring checks not turned on by default, this script
+# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
+
+# gccflags="-O3 -fomit-frame-pointer -funroll-all-loops -finline-functions"
+# gnatflags="-gnatN"
+
+gccflags="-O2"
+gnatflags="-gnatws"
+
+if [ $# -lt 3 ] ; then
+ echo Usage ERROR -- tool_prefix rtems_prefix target BSP
+ exit 1
+fi
+
+cross=yes
+prefix=$1
+rtemsdir=$2
+target=$3
+BSP=$4
+toolsuffix=-cross
+case $target in
+ *rtems*) ;;
+ *) echo Unknown Cross Target ; exit 1;;
+esac
+
+shift ; shift ; shift ; shift
+echo $*
+echo $#
+
+# Must be run in gcc/testsuite/ada/acats
+testdir=`pwd`
+
+adascriptdir=`dirname $0`
+vfile=`dirname $0`/../../../../VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+
+host_gnatchop=gnatchop
+host_gnatmake=gnatmake
+
+workdir=work-${BSP}
+
+if [ $# -eq 0 ]; then
+ rm -rf ${workdir}
+ mkdir ${workdir}
+ chapters=`cd ${testdir}/tests; echo [a-z]*`
+else
+ chapters=$*
+fi
+
+if [ ! -d ${workdir} ] ; then
+ echo "What happened to the working directory ${workdir}"
+ exit 1
+fi
+
+cd ${workdir}
+dir=`pwd`
+
+export RTEMS_MAKEFILE_PATH=${rtemsdir}/${target}/${BSP}
+ADASCRIPTDIR=${adascriptdir} \
+ make -f ${adascriptdir}/Makefile.rtems
+if [ $? -ne 0 ] ; then
+ exit 1
+fi
+
+# cat RTEMS_SETTINGS
+# exit 0
+
+# This should set everything we need to run the tests and build init.o
+. RTEMS_SETTINGS
+# End of customization section.
+
+display_noeol () {
+ printf "$@"
+ printf "$@" >> $dir/acats.sum
+ printf "$@" >> $dir/acats.log
+}
+
+display () {
+ echo "$@"
+ echo "$@" >> $dir/acats.sum
+ echo "$@" >> $dir/acats.log
+}
+
+log () {
+ echo "$@" >> $dir/acats.sum
+ echo "$@" >> $dir/acats.log
+}
+
+if [ "$testdir" = "" ]; then
+ echo You must use make check or make check-ada
+ exit 1
+fi
+
+if [ "$dir" = "$testdir" ]; then
+ echo "error: srcdir must be different than objdir, exiting."
+ exit 1
+fi
+
+#target_gnatmake () {
+# echo gnatmake --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\"
+# gnatmake --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
+#}
+#
+#target_gcc () {
+# $GCC $gccflags $*
+#}
+
+clean_dir () {
+ rm -f "$binmain" *.o *.ali > /dev/null 2>&1
+}
+
+find_main () {
+ ls ${i}?.adb > ${i}.lst 2> /dev/null
+ ls ${i}*m.adb >> ${i}.lst 2> /dev/null
+ ls ${i}.adb >> ${i}.lst 2> /dev/null
+ main=`tail -1 ${i}.lst`
+}
+
+EXTERNAL_OBJECTS=""
+# Global variable to communicate external objects to link with.
+
+rm -f $dir/acats.sum $dir/acats.log
+
+display " === acats configuration ==="
+
+# Hack XXX
+GCC=${target}-gcc
+
+target=`$GCC -dumpmachine`
+
+display target gcc is $GCC
+display `$GCC -v 2>&1`
+display host=`gcc -dumpmachine`
+display target=$target
+display `type gnatmake`
+gnatls -v >> $dir/acats.log
+display ""
+
+display " === acats support ==="
+display_noeol "Generating support files..."
+
+rm -rf $dir/support
+mkdir -p $dir/support
+cd $dir/support
+
+cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
+
+## ***** RTEMS is ALWAYS cross so this is just not going to work. *****
+## ***** We will get out values from the switch below. *****
+## # Find out the size in bit of an address on the target
+## target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
+## target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
+## # Easiest way to kill stupid CR/LF issues
+## dos2unix -q $dir/support/impbit.out
+## target_bit=`cat $dir/support/impbit.out`
+## echo target_bit="$target_bit" >> $dir/acats.log
+
+# Find out a suitable asm statement
+# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
+case "$target" in
+ ia64*-*-* | s390*-*-*)
+ target_insn="nop 0"
+ ;;
+ mmix-*-*)
+ target_insn="swym 0"
+ ;;
+ *)
+ target_insn="nop"
+ target_bit=32
+ ;;
+esac
+echo target_insn="$target_insn" >> $dir/acats.log
+
+sed -e "s,ACATS4GNATDIR,$dir,g" \
+ < $testdir/support/impdef.a > $dir/support/impdef.a
+sed -e "s,ACATS4GNATDIR,$dir,g" \
+ -e "s,ACATS4GNATBIT,$target_bit,g" \
+ -e "s,ACATS4GNATINSN,$target_insn,g" \
+ < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
+sed -e "s,ACATS4GNATDIR,$dir,g" \
+ < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
+
+cp $testdir/tests/cd/*.c $dir/support
+cp $testdir/tests/cxb/*.c $dir/support
+
+rm -rf $dir/run
+mv $dir/tests $dir/tests.$$ 2> /dev/null
+rm -rf $dir/tests.$$ &
+mkdir -p $dir/run
+
+cp -pr $testdir/tests $dir/
+
+for i in $dir/support/*.ada $dir/support/*.a; do
+ $host_gnatchop $i >> $dir/acats.log 2>&1
+done
+
+# These tools are used to preprocess some ACATS sources
+# they need to be compiled native on the host.
+
+$host_gnatmake -q -gnatws macrosub.adb
+if [ $? -ne 0 ]; then
+ display "**** Failed to compile macrosub"
+ exit 1
+fi
+./macrosub > macrosub.out 2>&1
+
+gcc -c cd300051.c
+$host_gnatmake -q -gnatws widechr.adb
+if [ $? -ne 0 ]; then
+ display "**** Failed to compile widechr"
+ exit 1
+fi
+./widechr > widechr.out 2>&1
+
+rm -f $dir/support/macrosub
+rm -f $dir/support/widechr
+rm -f $dir/support/*.ali
+rm -f $dir/support/*.o
+
+display " done."
+
+# From here, all compilations will be made by the target compiler
+
+display_noeol "Compiling support files..."
+
+target_gcc -c *.c
+if [ $? -ne 0 ]; then
+ display "**** Failed to compile C code"
+ exit 1
+fi
+
+target_gnatchop *.adt >> $dir/acats.log 2>&1
+
+target_gnatmake -c -gnato -gnatE *.ads >> $dir/acats.log 2>&1
+target_gnatmake -c -gnato -gnatE *.adb >> $dir/acats.log 2>&1
+
+display " done."
+display ""
+display " === acats tests ==="
+
+glob_countn=0
+glob_countok=0
+glob_countu=0
+
+for chapter in $chapters; do
+ display Running chapter $chapter ...
+
+ if [ ! -d $dir/tests/$chapter ]; then
+ display "*** CHAPTER $chapter does not exist, skipping."
+ display ""
+ continue
+ fi
+
+ cd $dir/tests/$chapter
+ ls *.a *.ada *.adt *.am *.dep 2> /dev/null | sed -e 's/\(.*\)\..*/\1/g' | \
+ cut -c1-7 | sort | uniq | comm -23 - $testdir/norun.lst \
+ > $dir/tests/$chapter/${chapter}.lst
+ countn=`wc -l < $dir/tests/$chapter/${chapter}.lst`
+ glob_countn=`expr $glob_countn + $countn`
+ counti=0
+ for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
+ counti=`expr $counti + 1`
+ extraflags=""
+ grep $i $testdir/overflow.lst > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ extraflags="$extraflags -gnato"
+ fi
+ grep $i $testdir/elabd.lst > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ extraflags="$extraflags -gnatE"
+ fi
+ grep $i $testdir/stackcheck.lst > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ extraflags="$extraflags -fstack-check"
+ fi
+ grep $i $testdir/ada95.lst > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ extraflags="$extraflags -gnat95"
+ fi
+ test=$dir/tests/$chapter/$i
+ mkdir $test && cd $test >> $dir/acats.log 2>&1
+
+ if [ $? -ne 0 ]; then
+ display "FAIL: $i"
+ failed="${failed}${i} "
+ clean_dir
+ continue
+ fi
+
+ target_gnatchop -c -w `ls ${test}*.a ${test}*.ada ${test}*.adt ${test}*.am ${test}*.dep 2> /dev/null` >> $dir/acats.log 2>&1
+ main=""
+ find_main
+ if [ -z "$main" ]; then
+ sync
+ find_main
+ fi
+ binmain=`echo $main | sed -e 's/\(.*\)\..*/\1/g'`
+ echo "BUILD $main" >> $dir/acats.log
+ EXTERNAL_OBJECTS=""
+ case $i in
+ cxb30*) EXTERNAL_OBJECTS="$dir/support/cxb30040.o $dir/support/cxb30060.o $dir/support/cxb30130.o $dir/support/cxb30131.o";;
+ ca1020e) rm -f ca1020e_func1.adb ca1020e_func2.adb ca1020e_proc1.adb ca1020e_proc2.adb > /dev/null 2>&1;;
+ ca14028) rm -f ca14028_func2.ads ca14028_func3.ads ca14028_proc1.ads ca14028_proc3.ads > /dev/null 2>&1;;
+ cxh1001) extraflags="-a -f"; echo "pragma Normalize_Scalars;" > gnat.adc
+ esac
+ if [ "$main" = "" ]; then
+ display "FAIL: $i"
+ failed="${failed}${i} "
+ clean_dir
+ continue
+ fi
+
+ target_gnatmake $extraflags -I$dir/support $main >> $dir/acats.log 2>&1
+ if [ $? -ne 0 ]; then
+ display "FAIL: $i"
+ failed="${failed}${i} "
+ clean_dir
+ continue
+ fi
+
+ echo "RUN $binmain" >> $dir/acats.log
+ cd $dir/run
+ if [ ! -x $dir/tests/$chapter/$i/$binmain ]; then
+ sync
+ fi
+ target_run $dir/tests/$chapter/$i/$binmain > $dir/tests/$chapter/$i/${i}.log 2>&1
+ cd $dir/tests/$chapter/$i
+ cat ${i}.log >> $dir/acats.log
+ case ${i} in
+ # There are tests RTEMS does not support because we only have
+ # a RAM based file system on simulators and the contents are
+ # fresh each time a program is run.
+ ce2108f|ce2108h|ce3112d)
+ log "UNSUPPORTED: $i"
+ glob_countn=`expr $glob_countn - 1`
+ glob_countu=`expr $glob_countu + 1`
+ ;;
+ *)
+ egrep -e '(==== |\+\+\+\+ |\!\!\!\! )' ${i}.log > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ unsupported=no
+ failed=no
+
+ grep 'Tasking not implemented' ${i}.log > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ unsupported=yes
+ else
+ case $BSP in
+ sis)
+ case ${i} in
+ # sis FPU simulation is faulty
+ cxg2005|cxg2012|cxg2014|cxg2017|cxg2018|cxg2020)
+ unsupported=yes
+ ;;
+ *) # other tests on sis
+ failed=yes
+ ;;
+ esac
+ ;;
+ *) # all tests on other BSPs
+ failed=yes
+ ;;
+ esac
+ fi
+ if [ ${failed} = yes ] ; then
+ display "FAIL: $i"
+ failed="${failed}${i} "
+ else
+ log "UNSUPPORTED: $i"
+ glob_countn=`expr $glob_countn - 1`
+ glob_countu=`expr $glob_countu + 1`
+ fi
+ else
+ log "PASS: $i"
+ glob_countok=`expr $glob_countok + 1`
+ fi
+ ;;
+ esac
+ clean_dir
+ done
+done
+
+display " === acats Summary ==="
+display "# of expected passes $glob_countok"
+display "# of unexpected failures `expr $glob_countn - $glob_countok`"
+
+if [ $glob_countu -ne 0 ]; then
+ display "# of unsupported tests $glob_countu"
+fi
+
+if [ $glob_countok -ne $glob_countn ]; then
+ display "*** FAILURES: $failed"
+fi
+
+exit 0
diff --git a/gcc_status b/gcc_status
new file mode 100755
index 0000000..95e529e
--- /dev/null
+++ b/gcc_status
@@ -0,0 +1,59 @@
+#! /bin/sh
+#
+# $Id$
+#
+
+vfile=`dirname $0`/VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+
+cpu=$1
+if [ $# -eq 1 ] ; then
+ limit=0
+elif [ $# -eq 2 ] ; then
+ limit=$2
+else
+ echo usage "$0 CPU [seconds]"
+ exit 1
+fi
+
+
+if [ ! -d ${BASEDIR}/b-gcc1-${cpu}/gcc/testsuite ] ; then
+ echo Test directory not found
+ exit 1
+fi
+
+cd ${BASEDIR}/b-gcc1-${cpu}/gcc/testsuite
+while :
+do
+ for BASE in gcc g++
+ do
+ LFILE=${BASE}/${BASE}.log
+ SFILE=${BASE}/${BASE}.log
+ if [ ! -r ${LFILE} ] ; then
+ continue
+ fi
+ loglines=`cat ${LFILE} | wc -l`
+ failed=`grep ^FAIL: ${SFILE} | wc -l`
+ passed=`grep ^PASS: ${SFILE} | wc -l`
+ unsupp=`grep ^UNSUPP ${SFILE} | wc -l`
+ unresolved=`grep ^UNRESOL ${SFILE} | wc -l`
+
+ printf "Lines in ${LFILE}: %5d\n" $loglines
+ printf "PASSED: %5d\n" $passed
+ printf "FAILED: %5d\n" $failed
+ printf "UNSUPPORTED: %5d\n" $unsupp
+ printf "UNRESOLVED: %5d\n" $unresolved
+ done
+
+ if [ ${limit} -eq 0 ] ; then
+ break
+ fi
+ sleep ${limit}
+done
+exit 0
+
diff --git a/rtems_gcc_main.c b/rtems_gcc_main.c
new file mode 100644
index 0000000..32cb8be
--- /dev/null
+++ b/rtems_gcc_main.c
@@ -0,0 +1,48 @@
+/* Init
+ *
+ * COPYRIGHT (c) 1989-2008.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <rtems.h>
+
+int main( int, char **, char **);
+
+/* configuration information */
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
+
+/* GCC tests start at main, use a lot of stack and may use the FPU */
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_INIT_TASK_ENTRY_POINT (void *)main
+#define CONFIGURE_INIT_TASK_STACK_SIZE (256 * 1024)
+#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+
+/* global variables */
+
+#if defined(__h8300__)
+void _wrap__exit(int e)
+{
+ return _wrap___exit(e);
+}
+#endif
+
+#if defined(__mips__)
+/* GCC sometimes expects this on the mips */
+void _flush_cache()
+{
+}
+#endif
diff --git a/rundeja b/rundeja
new file mode 100755
index 0000000..30c8764
--- /dev/null
+++ b/rundeja
@@ -0,0 +1,113 @@
+#! /bin/sh
+#
+#
+
+if [ $# -ne 1 ] ; then
+ echo USAGE: BSP
+ exit 1
+fi
+
+vfile=`dirname $0`/VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+
+case $1 in
+ eZKit533)
+ CPU=bfin
+ BSP=eZKit533
+ DEJABSP=nosim
+ BSP_SIM=nosim
+ ;;
+ edb7312)
+ CPU=arm
+ BSP=edb7312
+ DEJABSP=edb7312
+ BSP_SIM=edb7312
+ ;;
+ m32csim)
+ CPU=m32c
+ BSP=m32csim
+ DEJABSP=m32csim
+ BSP_SIM=m32csim
+ ;;
+ mcf5206elite)
+ CPU=m68k
+ BSP=mcf5206elite
+ DEJABSP=nosim
+ BSP_SIM=nosim
+ ;;
+ h8sim)
+ CPU=h8300
+ BSP=h8sim
+ DEJABSP=h8sim
+ BSP_SIM=h8sim-${RTEMS_VERSION}
+ ;;
+ simsh1)
+ CPU=sh
+ BSP=simsh1
+ DEJABSP=simsh1
+ BSP_SIM=simsh-${RTEMS_VERSION}
+ ;;
+ jmr3904)
+ CPU=mips
+ BSP=jmr3904
+ DEJABSP=jmr3904
+ BSP_SIM=jmr3904-${RTEMS_VERSION}
+ ;;
+ sis)
+ CPU=sparc
+ BSP=sis
+ DEJABSP=sis
+ BSP_SIM=sis-${RTEMS_VERSION}
+ ;;
+ psim)
+ CPU=powerpc
+ BSP=psim
+ DEJABSP=psim
+ BSP_SIM=psim-${RTEMS_VERSION}
+ ;;
+ qemu|pc386)
+ CPU=i386
+ BSP=pc386
+ DEJABSP=qemu
+ BSP_SIM=runqemu
+ ;;
+ *)
+ echo UNKNOWN BSP
+ exit 1
+ ;;
+esac
+
+rtemsdir=${BASEDIR}/bsp-install/${CPU}-rtems${RTEMS_VERSION}/${BSP}
+
+dfile=~/.dejagnurc
+if [ -r ${dfile} ] ; then
+ sed -e "s,^set boards_dir.*$,set boards_dir ${SCRIPTDIR}/dejagnu/boards," \
+ <${dfile} >XXX
+ mv XXX ${dfile}
+else
+ echo "set boards_dir ${SCRIPTDIR}/dejagnu/boards" >${dfile}
+fi
+
+RTEMS_MAKEFILE_PATH=${rtemsdir} \
+SCRIPTDIR=${SCRIPTDIR} \
+ make -f ${SCRIPTDIR}/Makefile.rtems_gccmain
+if [ $? -ne 0 ] ; then
+ echo unable to compile RTEMS GCC Main
+ exit 1
+fi
+rtems_config=`pwd`/rtems_gcc_main.o
+make check-gcc RUNTESTFLAGS="\
+SIM=${BSP_SIM} \
+RTEMS_MAKEFILE_PATH=${rtemsdir} \
+RTEMS_CONFIG_OBJ=${rtems_config} \
+--target_board=rtems-${CPU}-${DEJABSP} \
+"
+#"execute.exp=pr206*"
+# "execute.exp=pr206*"
+# vect.exp=vect*
+# powerpc.exp=405*
diff --git a/test_driver b/test_driver
new file mode 100755
index 0000000..6c744fc
--- /dev/null
+++ b/test_driver
@@ -0,0 +1,86 @@
+#! /bin/sh
+#
+# Test Driver
+#
+# $Id$
+#
+
+vfile=`dirname $0`/VERSIONS
+if [ ! -r ${vfile} ] ; then
+ echo VERSIONS file not found
+ exit 1
+fi
+
+source ${vfile}
+
+start=`date`
+echo Started at: ${start}
+
+BASEDIR=`pwd`
+
+# HELPER - Update RTEMS
+update_rtems()
+{
+ cd ${RTEMSDIR}
+ cvs up -Pd 2>&1 | grep -v ^cvs
+ ./bootstrap -c
+ ./bootstrap
+}
+
+# HELPER - Update GCC
+update_gcc()
+{
+ cd ${GCCDIR}
+ ./contrib/gcc_update
+}
+
+# HELPER - Remove all the installed previous builds
+clean_up()
+{
+ rm -rf install/* &
+ rm -rf bsp-install/* &
+ wait
+}
+
+install_auto()
+{
+ for auto in ${AUTOCONF} ${AUTOMAKE}
+ do
+ if [ ! -d ${auto} ] ; then
+ echo "${d} not installed"
+ exit 0
+ fi
+ cd ${auto}
+ make distclean
+ ./configure --prefix=${BASEDIR}/install
+ make all install
+ done
+}
+
+# Clean the install point
+clean_up
+
+# Update gcc and install autotools in parallel
+install_auto &
+update_gcc &
+wait
+
+# Do any remaining prep work in parallel
+update_rtems &
+wait
+
+# Build the native compiler as a baseline to build the others
+${SCRIPTDIR}/do_cpus native
+
+# Now cycle over all these CPUs
+if [ $? -eq 0 ] ; then
+ ${SCRIPTDIR}/do_cpus sparc mips
+ #${SCRIPTDIR}/do_cpus m32c arm h8300 i386 mips sh powerpc sparc
+ #${SCRIPTDIR}/do_cpus i386
+ # wait
+fi
+# ${SCRIPTDIR}/do_cpus sparc powerpc mips i386 arm
+
+stopped=`date`
+echo Started at: ${start}
+echo Stopped at: ${stopped}