blob: 35da97dfc887340130f7163e1536fc4a2941d56e [file] [log] [blame]
Daniel Dunbarb3a69012009-06-26 16:47:03 +00001#!/bin/sh
2
3function test () {
4 arch=$1
5 file=$2
6 name=$3
7 ldflags=$4
8
9 if gcc -arch $arch -Os $file $ldflags -DLIBNAME=$name
10 then
11 if ./a.out
12 then
13 rm ./a.out
14 else
15 echo "fail"
16 fi
17 else
18 echo "$FILE failed to compile"
19 fi
20}
21
22INSTALLED=/usr/local/lib/system/libcompiler_rt.a
23
24for ARCH in i386 x86_64; do
25 for FILE in $(ls *.c); do
26
27 echo "Timing $FILE for $ARCH"
28
29 test $ARCH $FILE libgcc ""
Daniel Dunbar48464e02010-01-18 06:49:33 +000030 test $ARCH $FILE tuned ../../darwin_fat/Release/libcompiler_rt.a
Daniel Dunbarb3a69012009-06-26 16:47:03 +000031 if [ -f "$INSTALLED" ]; then
32 test $ARCH $FILE installed $INSTALLED
33 fi
34
35 echo " "
36
37 done
38done
39exit