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:

 

Similar Posts

  • 6502 Assembler

    Back in the dark ages (the 1980’s), people like myself coded on Apple][ computers.  If you were good you coded in Applesoft BASIC or Integer BASIC. If you were really geeky you coded in Assembly language on the 6502 processor.  The Apple][ OS was coded in assembly language, so if you really wanted to understand what…

  • Release builds resulting from Log4j

    There are new release builds for some of the more widely used khubla.com libraries, resulting for patching for the log4j vulnerability. They are: ParadoxReader <groupId>com.khubla.pdxreader</groupId><artifactId>pdxreader</artifactId><version>1.6</version><packaging>jar</packaging> OLMReader <groupId>com.khubla.olmreader</groupId><artifactId>olmreader</artifactId><version>1.9.0</version><packaging>jar</packaging> JVMBasic kPascal

  • Building QEMU

    In general, I install QEMU on my Macbook using MacPorts.  However I recently had a need to get the tip of the QEMU development tree. Getting the QEMU source tree is trivial: git clone git://git.qemu-project.org/qemu.git I needed an updated version of dtc: git submodule update –init dtc The build instructions from the README are: mkdir…

  • AGC Grammar

    Every IT geek is, to some degree, fascinated with the Apollo program which put a human on the moon for the first time.  Naturally, there is also curiosity about the computers on the Apollo moon lander, and the software that ran on them.  The source code that went to the moon is available now, and…

  • Home Automation DevOps

    Home automation is coming into the mainstream a with recent offerings from the big tech companies, and I’m interested in it too. I’ve had a number of home automation controllers, most recently an H3 Pro SEL from HomeSeer. I’ve also become quite interested recently in DevOps monitoring, using InfluxDB, and Grafana.  Sensu, Telegraf and Prometheus…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.