forked from OSchip/llvm-project
parent
eadd21ea3c
commit
da208e779b
|
|
@ -1,36 +1,36 @@
|
||||||
for ARCH in i386 x86_64 ppc; do
|
for ARCH in i386 x86_64 ppc; do
|
||||||
for FILE in $(ls *.c); do
|
for FILE in $(ls *.c); do
|
||||||
# Use -nodefaultlibs to avoid using libgcc.a
|
# Use -nodefaultlibs to avoid using libgcc.a
|
||||||
# Use -lSystem to link with libSystem.dylb.
|
# Use -lSystem to link with libSystem.dylb.
|
||||||
# Note -lSystem is *after* libcompiler_rt.Optimized.a so that linker will
|
# Note -lSystem is *after* libcompiler_rt.Optimized.a so that linker will
|
||||||
# prefer our implementation over the ones in libSystem.dylib
|
# prefer our implementation over the ones in libSystem.dylib
|
||||||
EXTRA=
|
EXTRA=
|
||||||
if test $FILE = gcc_personality_test.c
|
if test $FILE = gcc_personality_test.c
|
||||||
then
|
then
|
||||||
# the gcc_personality_test.c requires a helper C++ program
|
# the gcc_personality_test.c requires a helper C++ program
|
||||||
EXTRA="-fexceptions gcc_personality_test_helper.cxx -lstdc++ /usr/lib/libgcc_s.1.dylib"
|
EXTRA="-fexceptions gcc_personality_test_helper.cxx -lstdc++ /usr/lib/libgcc_s.1.dylib"
|
||||||
# the libgcc_s.1.dylib use at the end is a hack until libSystem contains _Unwind_Resume
|
# the libgcc_s.1.dylib use at the end is a hack until libSystem contains _Unwind_Resume
|
||||||
fi
|
fi
|
||||||
if test $FILE = trampoline_setup_test.c
|
if test $FILE = trampoline_setup_test.c
|
||||||
then
|
then
|
||||||
# this test requires an extra compiler option
|
# this test requires an extra compiler option
|
||||||
EXTRA="-fnested-functions"
|
EXTRA="-fnested-functions"
|
||||||
fi
|
fi
|
||||||
if gcc -nodefaultlibs -arch $ARCH -Os $FILE ../../Release/libcompiler_rt.Optimized.a -lSystem $EXTRA
|
if gcc -nodefaultlibs -arch $ARCH -Os $FILE ../../Release/libcompiler_rt.Optimized.a -lSystem $EXTRA
|
||||||
then
|
then
|
||||||
echo "Testing $FILE for $ARCH"
|
echo "Testing $FILE for $ARCH"
|
||||||
if ./a.out
|
if ./a.out
|
||||||
then
|
then
|
||||||
rm ./a.out
|
rm ./a.out
|
||||||
else
|
else
|
||||||
echo "fail"
|
echo "fail"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$FILE failed to compile"
|
echo "$FILE failed to compile"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo "pass"
|
echo "pass"
|
||||||
exit
|
exit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue