From 3c8a7dfada1d39b33a24f58e039d6ba5c6cb3857 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 3 Sep 2009 20:09:38 +0000 Subject: [PATCH] Use -lc -lm to link with (in tests) on non-Darwin. llvm-svn: 80939 --- compiler-rt/test/Unit/test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler-rt/test/Unit/test b/compiler-rt/test/Unit/test index 9937966e1092..e5f540e94409 100755 --- a/compiler-rt/test/Unit/test +++ b/compiler-rt/test/Unit/test @@ -3,6 +3,9 @@ ARCHS='' if test `uname` = "Darwin"; then ARCHS="i386 x86_64 ppc" + LIBS="-lSystem" +else + LIBS="-lc -lm" fi for ARCH in $ARCHS; do @@ -27,7 +30,7 @@ for ARCH in $ARCHS; do # this test requires an extra compiler option EXTRA="-fnested-functions" fi - if gcc $CFLAGS $FILE ../../Release/libcompiler_rt.Optimized.a -lSystem $EXTRA + if gcc $CFLAGS $FILE ../../Release/libcompiler_rt.Optimized.a $LIBS $EXTRA then echo "Testing $FILE for $ARCH" if ./a.out -- GitLab