Cross-Compiler fun

I've been interested in OS development for a while, and now have a prototypical ARM OS on my private source tree.  For that I used gcc-arm-embedded, which worked quite well.  However, as time went on, i became interested in building my own tool chains.  I started with this list of requirements

  • An up-to-date C/C++ compiler, such as gcc or clang
  • I prefer gmake
  • On i386 I like nasm, but I'll use gas if necessary
  • I like ld, objcopy, etc from binutils
  • The targets I prefer to cross compile from are OS X and FreeBSD.  I prefer to cross-compile to i386, arm, sparc and mips targets

I ended up with two shell scripts, one for GCC/Binutils/Make and one for Clang/Binutils/Make, which download and install the latest GCC/Clang/Binutils and create a fully operational toolchain for the target of my choice.  You can find them here:

 

Leave a Reply