Compiler binaries


When I started out with the second incarnation of XML2PDF, I wanted a way whereby I could retain the portability afforded by PHP; which can run on pretty much any platform. At the same time I wanted a compiled solution, not a bunch of nailed together scripts. This naturally led to the GNU compiler collection (GCC), the de facto king of open source compilers. GCC supports a bunch of different languages, and has been ported to run on many different platforms including the iSeries.

So I looked for prebuilt binaries that would allow me to write one piece of code, and then compile that code for Linux or windows or the iSeries.

Linux seemed to be easy, after all much of Linux is built using GCC, and almost any mainstream Linux distro ships with GCC as an installable option. To digress a little, I say seemed because some (long) while ago the good people that drive GNU Linux moved away from statically linking libraries into an executable in favour of using dynamically loaded libraries. Good and well for executable size (and for a number of other excellent reasons). However, the first time I tried to take freshly compiled object built on 32bit Debian V6 and run in on my hosting companies 64 bit Linux platform, the wheels came off!

Windows also looked to be fairly easy, there are people (including Microsoft) that have built various Linux “shells” or environments that work fairly well under windows. The main contenders in this segment were Cygwin and MinGW. After a couple of false starts with MinGW, and Cygwin, I settled on MinGW-w64 as my choice of development environment on windows.

OK, now I needed a solution for the iSeries. This was certainly possible; from as early as 2004 a guy by the name of Oliver had gotten GCC to execute in the PASE environment of an iSeries running V5R2M0. Unfortunately, his main thrust was to get PHP executing on the iSeries and the alliance between IBM and Zend kind of took the wind out of his sails. I found a couple of other GCC builds targeting the PowerPC chip, but most of these were for a native AIX environment, not iSeries PASE. To further complicate things, the world changed as it so often does, and I no longer had an iSeries to hand to build anything with.

To cut a long story short, GCC can be built as a cross-compiler whereby it runs on platform x, but builds executables for platform y. Even though it often felt like herding butterflies, I achieved my goal by building GCC as a cross-compiler where I could develop on Linux (or Windows) and create execuatables for Linux, Windows, and the iSeries. The binaries found here are all built with Binutils 2.24 and GCC V4.8.2. They are all statically linked executables, and should run on almost any version of the platform they target: So the Linux binary tool-chain should run on any Linux version with kernel 2.6.32 or better, the iSeries tool-chain should run on any iSeries V5R2M0 or better (maybe even V4R5M0 but that isn’t tested), and the windows tool-chain should run on Windows XP or better.

GPL caveat: Note that source code is NOT included in these binary distributions: If you need or want source it is freely available from the GNU OS web site.


I have a bunch of different GCC builds (like a Linux tool-chain built using statically linked µClibc which can target almost any Linux distro, and builds that cross compile from windows to Linux or vica-versa). If you are interested in any of this lot drop me a line using the Mailform link below.

Print viewSitemapMailform