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

Rick Mann rmann at latencyzero.com
Tue Jun 3 14:30:01 PDT 2014


On Jun 3, 2014, at 14:26 , James Gregurich <bayoubengal at mac.com> wrote:

> 
> On Jun 3, 2014, at 3:40 PM, Rick Mann <rmann at latencyzero.com> wrote:
> 
>> 
>> On Jun 3, 2014, at 13:38 , James Gregurich <bayoubengal at mac.com> wrote:
>> 
>>> I don’t know if that will be practical. this stuff requires a lot of hand-jiggering to get it right. But, It will be a learning exercise!  :)
>> 
>> Well, any steps I can issue on the command line should be translatable into a recipe.
> 
> sure. but, is it going to work for all flavors of linux and whatever different ways there are of configuring binutils? over time as the projects evolve? 
> 
> For instance, I determined experimentally where those c runtime binaries are stored in my sysroot and where clang/ld wanted to find them. Are they going to be in the same place on all flavors of linux across all targets?
> 
> If it has to be constantly updated, it would be pain to maintain. But, maybe it can be done. go for it. Its worth the education. I don’t know the answer. I did just enough to serve my purposes.

This is on OS X (homebrew is a package manager of sorts for OS X that works by building everything from source. The forumula are well-defined Ruby scripts). So, yes, I think, generally, it will be the same, at least for a given version of Clang/LLVM.

>>> The only other major complication to using OSX to cross compile for linux is the tendency by linux folk to make use of case-sensitivity in their filesystems. You have to put their stuff on special volumes and even then the Finder doesn’t entire work correctly with the files.
>> 
>> Why? Why would anyone do that?
> 
> Linux folks work on Linux as mac folks work on macs. Its a well-defined feature on Linux that will always be there. People who aren’t interested in being on anything other than Linux will want to use that feature to their convenience. The Linux Kernel is an example of a project that requires a case-sensitive file system.  We aliens must adapt to their turf if we want to use their stuff. :)
> 
> Its not hard to work around…just a bit of an extra pain.

What I mean is, it's confusing for a human to look at two files that differ only in case. This is why Apple chose to go with a case-insensitive file system (it's case-preserving).

In any case, I think I'll skip Yocto for now. Your steps are still extremely applicable. Thanks!


-- 
Rick







More information about the cfe-dev mailing list