http://llvm.org/bugs/show_bug.cgi?id=16707

            Bug ID: 16707
           Summary: undefined reference to `__sqrtl_finite' when using
                    LLVM with Linaro's GCC-4.7
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

sqrtl.c:

#include <math.h>

int main(){
volatile long double a=123;
volatile long double c;
c = sqrtl(a);
return c;
} 


LLVM generates call to __sqrtl_finite, but GCC, at -O0 generates call to sqrt.

LLVM:

clang
--sysroot=<PATH_TO_GCC47>/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux
-O3 -ffast-math -fmath-errno -marm sqrtl.c -S -o clang.s -mfloat-abi=hard

arm-linux-gnueabihf-g++ -O3 -ffast-math -fmath-errno -marm clang.s -lm
/tmp/ccHQeKP4.o: In function `main':
sqrtl.c:(.text+0x24): undefined reference to `__sqrtl_finite'
collect2: error: ld returned 1 exit status

GCC-4.7:

arm-linux-gnueabihf-g++ -O0 -ffast-math -fmath-errno -marm sqrtl.c -S -o gcc.s

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to