compiler-rt for arm-none-eabi targets

I’m trying to build compiler-rt for bare-metal arm-none-eabi targets. I don’t need any of the existing compiler-rt functionality(though the builtin(s) may be nice). I want to extend it with custom functionality for the arm-none-eabi targets.

Can anyone give me some pointers on how to go about doing this. I’m currently doing a combined build of llvm, clang and compiler-rt for both X86 and ARM targets. I am building on ubuntu 14.04, with latest prebuilt llvm binaries(3.9) and latest cmake. My cmake shows that only the X86_64 and i386 architectures are supported for building compilter-rt.

Thanks Abe

Hi Abe,

Support for cross compiling RT is precarious. There were some attempts
in the past, but not very successful, so I normally just build

Chris B (CC'd) is working on that part for Darwin / ARM [1], but we
should also get something working for Linux (if that's what you need).
As soon as his integration work finishes we can try some magic on our

If you could try his new scheme (using runtime dir instead of
projects), it may make the process smoother later on. Also, feel free
to pick up on the task, if that interests you, as I'll only have time
to look at that in a few months from now...

I'm also copying Saleem and Jon that have worked around this topic
more than I did, and can help with more info.



Unfortunately I’ve actually hit a bit of a wall in terms of sorting out the compiler-rt arm builds.

There are some unfortunate special cases for Linux and Android in both compiler-rt’s build the clang driver, which I haven’t yet thought my way through.

The patch I had intended to help move this along was, but the non-standard interpretation of the triple for Linux and Android are problematic when trying to provide a generic convention-based solution.


Heh, welcome to the ARM Linux world! :slight_smile:

Your patch seems better (as it provides a default) but would be good
to be able to override somehow. I'll review in there...