minix/sys/external/bsd/compiler_rt/dist/test/timing/time
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00

39 lines
651 B
Bash
Executable file

#!/bin/sh
function test () {
arch=$1
file=$2
name=$3
ldflags=$4
if gcc -arch $arch -Os $file $ldflags -DLIBNAME=$name
then
if ./a.out
then
rm ./a.out
else
echo "fail"
fi
else
echo "$FILE failed to compile"
fi
}
INSTALLED=/usr/local/lib/system/libcompiler_rt.a
for ARCH in i386 x86_64; do
for FILE in $(ls *.c); do
echo "Timing $FILE for $ARCH"
test $ARCH $FILE libgcc ""
test $ARCH $FILE tuned ../../darwin_fat/Release/libcompiler_rt.a
if [ -f "$INSTALLED" ]; then
test $ARCH $FILE installed $INSTALLED
fi
echo " "
done
done
exit