[cfe-dev] Using clang for cross-compiling to Cortex M4
Rick Mann
rmann at latencyzero.com
Tue Jun 3 09:53:40 PDT 2014
Thanks, Renato.
Is compiler-rt sufficient? That doesn't provide the std libs, right?
I have a working installation of clang/llvm HEAD, I'm guessing I should use that to compile complier-rt, but I want to target ARMv7M...how do I build compiler-rt that way? I don't see it specified in either the docs for compiler-rt, or clang.
I checked out compiler-rt as shown here: http://compiler-rt.llvm.org
Are there options to pass to cmake?
On Jun 3, 2014, at 04:08 , Renato Golin <renato.golin at linaro.org> wrote:
> 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
--
Rick
More information about the cfe-dev
mailing list