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

James Gregurich bayoubengal at mac.com
Tue Jun 3 13:38:12 PDT 2014


On Jun 3, 2014, at 3:13 PM, Rick Mann <rmann at latencyzero.com> wrote:

> Thanks, James, that gives me a great starting point.
> 
> Now to figure out how to write a homebrew formula to do this ;-)
> 

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!  :)

What you COULD do that would be maintainable is to get Yocto working on OSX. Yocto is a package manager made for cross-compiling for embedded projects. The problem with it is the host-recipes aren’t OSX-friendly. They are all linux-specific. Yocto itself can be made to run  on OSX with a few minor patches and putting certain gnu tools place of OSX tools (sed comes to mind). Once you have that Yocto would be able to drive your toolchain the same way it does on Linux. 

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.

But, it can be done for those of us who like a more luxury unix environment. 

-James









More information about the cfe-dev mailing list