[LLVMdev] [compiler-rt] is the arm lib complete?

Nick Kledzik kledzik at apple.com
Thu Nov 15 20:00:48 PST 2012


On Nov 15, 2012, at 9:33 PM, liangh at codeaurora.org wrote:
> I'm trying to link my objs with compiler-rt built runtime lib for arm.
> According to the compiler-rt doc, it should be able to replace libgcc.
> However, if I replace "-lgcc" with "compiler-rt.a" for a static linking,
> gcc linker complains about undefined functions. Using "nm -g", I compared
> the functions in libgcc and compiler-rt.full-arm.a and found there are
> many missing functions in compiler-rt, such as "__aeabi_dcmpeq"
> "__sync_lock_release_1" "_interwork_call_via_fp", etc.
> 
> Although I can use compiler-rt.a via using "-allow-multiple-definition" to
> override libgcc, this is an ugly solution.
> 
> Anybody know how to fully replace libgcc with compiler-rt? Do I need to
> link some other lib to totally replace libgcc when using compiler-rt, or
> compiler-rt cannot fully replace libgcc yet? I know Apple is using
> compiler-rt built runtime libs. How did they link?

What compiler are you using?  compiler-rt was designed to implement the support functions needed for clang.  If you are compiling with gcc, then, yes you might find it relies on support functions not in libcompiler-rt.a.

-Nick




More information about the llvm-dev mailing list