[cfe-dev] Using clang for cross-compiling to Cortex M4

Renato Golin renato.golin at linaro.org
Tue Jun 3 04:08:36 PDT 2014


On 3 June 2014 04:00, Rick Mann <rmann at latencyzero.com> wrote:
> I'm having a hard time figuring out how to build clang/llvm to let me target a small Cortext M4 MCU. I've got HEAD clang installed, but apparently no runtime or standard libraries.

Hi Rick,

That's right, you're going to need ARM libraries. I know Compiler-RT
works well on ARMv7A, but I'm not sure about v7M, maybe Tim can help
you on that.

Another way is to have multilib gcc/lib packages installed on your
box, so that you can use GNU's libraries, as well as ld and as. The
integrated assembler is on by default on ARM on trunk (not on 3.4),
but if you encounter problems you can use -no-integrated-as option and
GNU as will be called instead.

Remember to add -I and -L paths to your compilation, as distributions
do vary greatly where they are...

Hope that helps,
--renato



More information about the cfe-dev mailing list