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

James Gregurich bayoubengal at mac.com
Tue Jun 3 11:24:34 PDT 2014


*FOR the crosscompiler…the platform that runs the compiler. 

On Jun 3, 2014, at 1:23 PM, James Gregurich <bayoubengal at mac.com> wrote:

> 
> Do you have a working sysroot for your target system?
> What is your host platform from the cross compiler?
> 
> 
> 
> On Jun 3, 2014, at 1:20 PM, Rick Mann <rmann at latencyzero.com> wrote:
> 
>> Definitely C++, but RTTI and exceptions aren't necessary (although, nice to have).
>> 
>> On Jun 3, 2014, at 11:19 , James Gregurich <bayoubengal at mac.com> wrote:
>> 
>>> Do you intend to use C++ or just C?
>>> I assume your target is Linux?
>>> 
>>> 
>>> 
>>> On Jun 2, 2014, at 10:00 PM, 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. I've read through
>>>> 
>>>> 	http://clang.llvm.org/docs/CrossCompilation.html
>>>> 
>>>> and took a look at
>>>> 
>>>> 	http://llvm.org/docs/CMake.html
>>>> 
>>>> It talks about how to build LLVM to target an architecture, but I thought LLVM was able to target all its targets without having to be built specifically for each target. The clang/llvm I have install has all targets enabled, and I can pass it -target arm-none-eabi -mcpu=cortext-m4, and it seems to do the right thing.
>>>> 
>>>> What I'd like to do is make a homebrew formula to build an LLVM-based toolchain to target small ARM MCUs (I realize I'll have to use GNU binutils to link, that's fine). But I can't really figure out how to build it even manually.
>>>> 
>>>> 
>>>> -- 
>>>> Rick
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> cfe-dev mailing list
>>>> cfe-dev at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>> 
>> 
>> 
>> -- 
>> Rick
>> 
>> 
>> 
> 





More information about the cfe-dev mailing list