[LLVMdev] Customize Standard C Library Using LLVM (to support llvm backend optimization)

Richard Gorton rcgorton at cognitive-electronics.com
Wed Mar 11 14:22:34 PDT 2015


I can confirm that musl builds and works correctly with clang/llvm. We 
are using musl as a libc for our architecture.
It has a much smaller code footprint than newlib or glibc.

Regards,

     Richard


On 3/11/2015 4:24 PM, Chao Yan wrote:
>
>         FWIW, I build baremetal newlib for arm-eabi using clang, and
>         it works. I had to patch a few of the __attribute__((naked))
>         functions because they were using pre-UAL asm syntax, but for
>         the most part it "just works".
>
>
> I build the baremetal newlib using arm-none-eabi-gcc as well, but 
> after linking with the hello world program, it failed to run on both 
> qemu-arm and gem5.
>
>
>
>     Have you considered trying musl? It's supposed to be a full
>     replacement for glibc.
>
>
> It looks like a nice alternative, I'll certainly look into it right away.
>
>
>     Have you run it in a debugger to figure out *why* it is
>     segfaulting? Have you tried building it without your special pass?
>
> Well, I didn't try clang, I use arm-none-eabi-gcc to build the newlib 
> and the hello world program. The arm-none-eabi-gdb says "Don't know 
> how to run.  Try "help target"."
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150311/6b1ee9e8/attachment.html>


More information about the llvm-dev mailing list