Building FSF GCC with GNAT for Mac OS X

Building FSF GCC with GNAT for Mac OS X is not a trivial task, despite Simon J. Wright’s very clear and concise notes/instructions.

I’m building on a 15″ Macbook Pro with a 2.4 GHz Intel Core 2 Duo processor and 4 GB of RAM, running Mac OS X Lion 10.7.1 with Xcode 4.1. FSF GCC Ada requires a working GNAT compiler. I started with GNAT GPL 2011, which I installed at /opt/gnat-gpl-2011, so I adjust my PATH to make this compiler the default choice: $ PATH=/opt/gnat-gpl-2011/bin:$PATH

So it all starts with GNAT GPL from libre.adacore. This step is by far the simplest to understand. Going forward it gets a lot more complicated, and unless you’re some kind of compiler wizard, you’re probably going to find Simon’s notes invaluable for getting FSF GCC up and running on your Mac.

Leave a Reply