-EDG_BIN="edgcpfe"
-EDG_CFLAGS="--c --gnu=30305 -I/usr/lib/gcc-lib/i586-suse-linux/3.3.5/include"
-GCC_CFLAGS="-O3 -g -fomit-frame-pointer"
+#!/bin/sh
+
+export LANG=
+export LC_ALL=
+export LC_COLLATE=
+if test "$1" != "--recursive-hack"; then
+ "$0" --recursive-hack "$@"
+ exit $?
+else
+ shift
+fi
+
+ECC="eccp"
+ECC_CFLAGS="${ADDCFLAGS} -O3 -c -D__builtin_memcpy=memcpy -D__builtin_memset=memset -D__builtin_strlen=strlen -D__builtin_strcpy=strcpy -D__builtin_strcmp=strcmp -DNO_TRAMPOLINES"
+GCC="gcc"
+GCC_CFLAGS="-O0 -Itcc"
LINKFLAGS="-lm"
TIMEOUT_COMPILE=300
TIMEOUT_RUN=30
CFILES="*.c"
-OUTPUTDIR="stats-`date +%d.%m.%y`"
+OUTPUTDIR="stats-`date +%y.%m.%d`"
mkdir -p build_firm
mkdir -p build_gcc
<?xml version="1.0"?>
<results>
<environment>
- <EDG_CFLAGS>${EDG_CFLAGS}</EDG_CFLAGS>
+ <ECC_CFLAGS>${ECC_CFLAGS}</ECC_CFLAGS>
<GCC_CFLAGS>${GCC_CFLAGS}</GCC_CFLAGS>
</environment>
__END__
basedir=`pwd`
-for dir in . gcc-testsuite gcc-testsuite/ieee; do
+DIRS=". langshootout ack gcc-testsuite gcc-testsuite/ieee"
+test -n "$1" && DIRS="$1"
+
+for dir in $DIRS; do
curdir=$basedir/$dir
echo "<section name=\"$curdir/\">" >> $XMLRES
for file in $curdir/$CFILES; do
res="$OUTPUTDIR/buildresult_$name.txt"
echo "Building $name"
echo "Results for $name" > $res
- echo "*** EDG/FIRM Compile" >> $res
- CMD="ulimit -t$TIMEOUT_COMPILE ; ${EDG_BIN} ${EDG_CFLAGS} $file"
+ echo "*** ECC/FIRM Compile" >> $res
+ CMD="ulimit -t${TIMEOUT_COMPILE} ; ${ECC} ${ECC_CFLAGS} $file"
echo "$CMD" >> $res
- /bin/bash -c "ulimit -t300 ; ${EDG_BIN} ${EDG_CFLAGS} $file" >> $res 2>&1 || COMPILE_RES="failed"
+ /bin/bash -c "ulimit -t${TIMEOUT_COMPILE} ; ${ECC} ${ECC_CFLAGS} $file" >> $res 2>&1 || COMPILE_RES="failed"
if [ ${COMPILE_RES} == "ok" ]; then
LINK_RES="ok"
echo "$CMD" >> $res
$CMD >> $res 2>&1
echo "*** Linking" >> $res
- CMD="gcc build_firm/$name.s ${LINKFLAGS} -o build_firm/$name.exe"
+ CMD="${ECC} build_firm/$name.s ${LINKFLAGS} -o build_firm/$name.exe"
echo "$CMD" >> $res
$CMD >> $res 2>&1 || LINK_RES="failed"
fi
echo "*** GCC Compile" >> $res
- CMD="gcc ${GCC_CFLAGS} $file ${LINKFLAGS} -o build_gcc/$name.exe"
+ CMD="${GCC} ${GCC_CFLAGS} $file ${LINKFLAGS} -o build_gcc/$name.exe"
echo "$CMD" >> $res
$CMD >> $res 2>&1 || GCC_RES="failed"
GCC_RUN_RES="ok"
echo "*** Run GCC" >> $res
- CMD="build_gcc/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
+ CMD="ulimit -t${TIMEOUT_RUN} ; build_gcc/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
echo "$CMD" >> $res
- /bin/bash -c "ulimit -t$TIMEOUT_RUN ; build_gcc/$name.exe" > $OUTPUTDIR/result_gcc_$name.txt 2>&1 || GCC_RUN_RES="failed"
+ /bin/bash -c "ulimit -t${TIMEOUT_RUN} ; build_gcc/$name.exe" > $OUTPUTDIR/result_gcc_$name.txt 2>&1 || GCC_RUN_RES="failed"
fi
if [ ${LINK_RES} = "ok" ]; then
FIRM_RUN_RES="ok"
echo "*** Run Firm" >> $res
- CMD="build_firm/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
+ CMD="ulimit -t${TIMEOUT_RUN} ; build_firm/$name.exe > $OUTPUTDIR/result_gcc_$name.txt 2>&1"
echo "$CMD" >> $res
- /bin/bash -c "ulimit -t$TIMEOUT_RUN ; build_firm/$name.exe" > $OUTPUTDIR/result_firm_$name.txt 2>&1 || FIRM_RUN_RES="failed"
+ /bin/bash -c "ulimit -t${TIMEOUT_RUN} ; build_firm/$name.exe" > $OUTPUTDIR/result_firm_$name.txt 2>&1 || FIRM_RUN_RES="failed"
fi
if [ ${GCC_RUN_RES} = "ok" -a ${FIRM_RUN_RES} = "ok" ]; then