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

Rick Mann rmann at latencyzero.com
Tue Jun 3 11:13:21 PDT 2014


Moreover, I want it to build compiler-rt using the very clang/llvm I checked out. Does it do compiler-rt using those freshly-built tools?

On Jun 3, 2014, at 10:58 , Halfdan Ingvarsson <halfdan at sidefx.com> wrote:

> Try the checkout instructions on the clang page instead: http://clang.llvm.org/get_started.html
> 
> I've never had any success building compiler-rt out-of-tree.
> 
> - ½
> 
> On 14-06-03 12:55 PM, Rick Mann wrote:
>> Oh, nevermind. Even those basic compiler-rt build instructions don't work:
>> 
>> 	https://pastee.org/h4f68
>> 
>> I give up.
>> 
>> 
>> 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