summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-12-01 19:17:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-12-01 19:17:34 +0000
commitba5d55b7e3d61a7eef253dfd0aef14e5b9e8fcb7 (patch)
tree7f26f40a9cc82c9299ceb7c5f3bc5fe4b9cea8cb /gcc
parent6effcd25d3fe3907d2d623b682ebead0ac9d2aee (diff)
2011-12-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* do_one: If a secondary language fails to build, do not abort build but continue on and attempt other secondary languages. Clean up arguments to rundeja to reflect clean up in that script. * rtems_gcc_main.c: Add /tmp directory and file support so more tests pass. Make sure argc/argv are correctly setup. * rtems_gcj_init.c: Add comment. * rundeja: Consolidate similar cases to eliminate duplication. * test_driver: Install autotools if autoconf is not at install point.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rwxr-xr-xgcc/do_one24
-rw-r--r--gcc/rtems_gcc_main.c29
-rw-r--r--gcc/rtems_gcj_init.c4
-rwxr-xr-xgcc/rundeja102
-rwxr-xr-xgcc/test_driver2
6 files changed, 83 insertions, 89 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d61dbd..c5ce5fb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2011-12-01 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * do_one: If a secondary language fails to build, do not abort build but
+ continue on and attempt other secondary languages.
+ Clean up arguments to rundeja to reflect clean up in that script.
+ * rtems_gcc_main.c: Add /tmp directory and file support so more tests pass.
+ Make sure argc/argv are correctly setup.
+ * rtems_gcj_init.c: Add comment.
+ * rundeja: Consolidate similar cases to eliminate duplication.
+ * test_driver: Install autotools if autoconf is not at install point.
+
2011-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* do_one: do_cleanup defaults to "no".
diff --git a/gcc/do_one b/gcc/do_one
index 4cc3620..4bf4394 100755
--- a/gcc/do_one
+++ b/gcc/do_one
@@ -592,7 +592,6 @@ j_gcc()
echo "Failed to install GCC C/C++ .. bailing"
exit 1
fi
-
}
if [ ${do_stage1} = "yes" ] ; then
@@ -647,13 +646,15 @@ j_rtems()
cd ..
if [ $status -ne 0 ] ; then
echo "Failed building RTEMS for ${cpuArg}/${bspArg}"
- exit $status
+ if [ ${bspArg} != "multilib" ] ; then
+ exit $status
+ fi
fi
}
if [ ${do_rtems} = "yes" ] ; then
echo "Building RTEMS for ${cpu} ${bsp} ..."
- time j_rtems ${cpu} multilib >${LOGDIR}/${cpu}-rtems-multilib.log 2>&1
+ time j_rtems ${cpu} multilib ${bsp} >${LOGDIR}/${cpu}-rtems-multilib.log 2>&1
if [ $? -ne 0 ] ; then
echo "Failed to build RTEMS multilib for ${cpu}"
exit 1
@@ -828,7 +829,7 @@ j_gccada()
make install
status=$?
if [ $status -ne 0 ] ; then
- echo "Failed building Ada"
+ echo "Failed building Ada - continuing to next secondary language"
fi
return $status
}
@@ -917,9 +918,9 @@ j_gccgo()
make install
status=$?
if [ $status -ne 0 ] ; then
- echo "Failed building Go"
+ echo "Failed building Go - continuing to next secondary language"
fi
- exit $status
+ return $status
}
go_fail="no"
@@ -986,7 +987,6 @@ fi
if [ ${do_gccgo} = "yes" ] ; then
test ${do_cleanup} = "yes" && rm -rf ${BUILDDIR}/b-${cpu}-go
fi
-exit 0
##### Build a GCJ compiler now that we have a cross installed
j_gcj()
@@ -1031,9 +1031,9 @@ j_gcj()
make install
status=$?
if [ $status -ne 0 ] ; then
- echo "Failed building GCJ"
+ echo "Failed building GCJ - continuing to next secondary language"
fi
- exit $status
+ return $status
}
gcj_fail="no"
@@ -1054,7 +1054,7 @@ if [ $a ${run_libjavatests} = "yes" -a \
-d ${BASEDIR}/b-${cpu}-gcj -a ${gcj_fail} = "no" ] ; then
echo "Running libjava DejaGNU tests..."
cd ${BASEDIR}/b-${cpu}-gcj || exit 1
- time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} libjava \
+ time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} java \
>${LOGDIR}/${cpu}-libjavatests-${bsp}.log 2>&1
RDIR=${RESULTSDIR}/${TARGET}-${bsp}/`date +%Y-%m-%d-%H-%M-%S`
@@ -1096,9 +1096,9 @@ j_fortran()
make install
status=$?
if [ $status -ne 0 ] ; then
- echo "Failed building FORTRAN"
+ echo "Failed building FORTRAN - continuing to next secondary language"
fi
- exit $status
+ return $status
}
fortran_fail="no"
diff --git a/gcc/rtems_gcc_main.c b/gcc/rtems_gcc_main.c
index 3753c05..31ac03e 100644
--- a/gcc/rtems_gcc_main.c
+++ b/gcc/rtems_gcc_main.c
@@ -1,6 +1,7 @@
-/* Init
- *
- * COPYRIGHT (c) 1989-2008.
+/*
+ * Main for GCC Tests
+ *
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -11,8 +12,23 @@
*/
#include <rtems.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+/*
+ * Set up first argument
+ */
+static int argc = 1;
+static char arg0[20] = "rtems";
+static char *argv[20] = { arg0 };
-int main( int, char **, char **);
+int main(int argc, char **argv, char **environp);
+
+rtems_task Init(rtems_task_argument ignored)
+{
+ mkdir( "/tmp", 0777 );
+ main(argc, argv, NULL);
+}
/* configuration information */
#define CONFIGURE_MAXIMUM_TASKS 1
@@ -24,7 +40,6 @@ int main( int, char **, char **);
/* 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
#if defined(__m32c__)
#define CONFIGURE_INIT_TASK_STACK_SIZE (16 * 1024)
#else
@@ -32,6 +47,10 @@ int main( int, char **, char **);
#endif
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
+/* This helps language tests which need a real filesystem */
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
+
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_INIT
diff --git a/gcc/rtems_gcj_init.c b/gcc/rtems_gcj_init.c
index 07da0b8..62b0364 100644
--- a/gcc/rtems_gcj_init.c
+++ b/gcc/rtems_gcj_init.c
@@ -1,3 +1,7 @@
+/*
+ * Main for GCJ Testing
+ */
+
#include <bsp.h>
#include <stdlib.h>
#include <pthread.h>
diff --git a/gcc/rundeja b/gcc/rundeja
index f32f4fb..82a3eb6 100755
--- a/gcc/rundeja
+++ b/gcc/rundeja
@@ -117,7 +117,32 @@ else
echo "set boards_dir ${SCRIPTDIR}/dejagnu/boards" >${dfile}
fi
-case $2 in
+testsuite=$2
+case ${testsuite} in
+ libgo) ;;
+ gccgo)
+ testmain=rtems_gccgo_init.o
+ makefile=Makefile.rtems_gccgoinit
+ stanza=check-go
+ ;;
+ java)
+ testmain=rtems_gcj_init.o
+ makefile=Makefile.rtems_gcjinit
+ stanza=check-gcc-java
+ ;;
+ gcc|objc|fortran|gccgo|java)
+ testmain=rtems_gcc_main.o
+ makefile=Makefile.rtems_gccmain
+ stanza=check-${testsuite}
+ ;;
+ *)
+ testmain=rtems_gcc_main.o
+ makefile=Makefile.rtems_gccmain
+ stanza=check
+ ;;
+esac
+
+case ${testsuite} in
libgo)
rtems_libgo_init=${SCRIPTDIR}/gcc/rtems_libgo_init.c
rtems_bin2c=${INSTALL}/bin/rtems-bin2c
@@ -130,86 +155,21 @@ case $2 in
--target_board=rtems-${CPU}-${DEJABSP} \
"
;;
- gccgo)
- RTEMS_MAKEFILE_PATH=${rtemsdir} \
- SCRIPTDIR=${SCRIPTDIR} \
- make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccgoinit
- if [ $? -ne 0 ] ; then
- echo unable to compile RTEMS GCC Go Init File
- exit 1
- fi
- rtems_config=`pwd`/rtems_gccgo_init.o
- make check-go RUNTESTFLAGS="\
- SIM=${BSP_SIM} \
- RTEMS_MAKEFILE_PATH=${rtemsdir} \
- RTEMS_CONFIG_OBJ=${rtems_config} \
- --target_board=rtems-${CPU}-${DEJABSP} \
- "
- ;;
- objc)
- RTEMS_MAKEFILE_PATH=${rtemsdir} \
- SCRIPTDIR=${SCRIPTDIR} \
- make -f ${SCRIPTDIR}/gcc/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-objc RUNTESTFLAGS="\
- SIM=${BSP_SIM} \
- RTEMS_MAKEFILE_PATH=${rtemsdir} \
- RTEMS_CONFIG_OBJ=${rtems_config} \
- --target_board=rtems-${CPU}-${DEJABSP} \
- "
- ;;
- libjava)
- RTEMS_MAKEFILE_PATH=${rtemsdir} \
- SCRIPTDIR=${SCRIPTDIR} \
- make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gcjinit
- if [ $? -ne 0 ] ; then
- echo unable to compile RTEMS GCC Java Init File
- exit 1
- fi
- rtems_config=`pwd`/rtems_gcj_init.o
- make check-gcc-java RUNTESTFLAGS="\
- SIM=${BSP_SIM} \
- RTEMS_MAKEFILE_PATH=${rtemsdir} \
- RTEMS_CONFIG_OBJ=${rtems_config} \
- --target_board=rtems-${CPU}-${DEJABSP} \
- "
- ;;
- gcc)
- RTEMS_MAKEFILE_PATH=${rtemsdir} \
- SCRIPTDIR=${SCRIPTDIR} \
- make -f ${SCRIPTDIR}/gcc/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} \
- "
- ;;
- *)
+ gcc|objc|fortran|gccgo|java|*)
RTEMS_MAKEFILE_PATH=${rtemsdir} \
SCRIPTDIR=${SCRIPTDIR} \
- make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccmain
+ make -f ${SCRIPTDIR}/gcc/${makefile}
if [ $? -ne 0 ] ; then
- echo unable to compile RTEMS GCC Main
+ echo unable to compile RTEMS Init File for ${testsuite}
exit 1
fi
- rtems_config=`pwd`/rtems_gcc_main.o
- echo make check RUNTESTFLAGS="\
+ rtems_config=`pwd`/${testmain}
+ make ${stanza} RUNTESTFLAGS="\
SIM=${BSP_SIM} \
RTEMS_MAKEFILE_PATH=${rtemsdir} \
RTEMS_CONFIG_OBJ=${rtems_config} \
--target_board=rtems-${CPU}-${DEJABSP} \
"
-exit 0
;;
esac
diff --git a/gcc/test_driver b/gcc/test_driver
index 58efa9d..860aa87 100755
--- a/gcc/test_driver
+++ b/gcc/test_driver
@@ -298,7 +298,7 @@ if [ ${doCleanInstallPoint} = "yes" ] ; then
fi
# Update gcc and install autotools in parallel
- if [ ${doCleanInstallPoint} = "yes" ] ; then
+ if [ ! -r ${INSTALL}/bin/autoconf ] ; then
install_auto
fi
if [ ${doUpdateTools} = "yes" ] ; then