[LLVMdev] Cross-compiling the ARM toolchain

Emmanuel Blot eblot.ml at gmail.com
Tue Sep 21 14:26:07 PDT 2010


> Virtually all. As far as I could test, all major architectures
> (v4/v5/v6 + v7-A-R-M), although I'm still fighting with some Thumb
> code generation.

Not a big issue for me: targets are ARMv4 (ARM7) and ARMv5 (ARM9)
"classic" CPUs - in ARM terminology. No cortex.

> I haven't tested dragonegg, but clang and llvm-gcc do the job.
> llvm-gcc seems to be more in sync with the ARM backend (for obvious
> reasons), but it's a nightmare to compile it to the ARM backend. Clang
> supports it out of the box.

I've been able to build clang + llvm from the SVN repository.

However my targets (arm-eabi) are relying on the "newlib" standard
library. I'm not sure how to build the llvm-gcc backend so that it
uses this library.
I'm used to build GCC (4.x) toolchains with newlib, but how can I do
the same with llvm-gcc ?
It seems that clang attemps to find the header files from the host
system dir, not from the target system dir, so I guess that I missed
an important option ... somewhere.

I've replaced the "arm-eabi-gcc" calls from my Makefiles with "clang
-ccc-host-triple arm-eabi -ccc-gcc-name arm-eabi-gcc" but clang
probably needs some other options (?)

Thanks,
Emmanuel.



More information about the llvm-dev mailing list