iSeries native GCC

With the other tool chains in place, this was not so difficult.

I needed a "sysroot" both to build the compiler with, and to use when the compiler actually generates executables. AIX is a proprietary OS, so it is not possible to build an AIX libc library from scratch. As a work around I simply copied a bunch of .h files and library executables from an iSeries with PASE loaded. The source machine was V5R4M0. As an aside, Binutils as at V2.24 is not capable of creating or linking AIX shared library objects. I therefore stripped out anything to do with AIX shared libraries (notably libC and friends as opposed to libc). This also helped with the windows version of the iSeries compiler, because windows isn’t so clever with file name case sensitivity! Note also that I have patched some of the PASE header files specifically with respect to large file support. In my humble opinion the original IBM headers were broken with misplaced #ifdef #define and so on for large file support.

Disclaimer – I dunno how legal it is to ship part of OS/400 with this compiler (specifically – the core AIX c libraries in PASE). Which same is why the list of stuff offered may shrink over time! See also the WARNING below - don't break your iSeries.

Buildtools is a collection of things that enable development - like GNU make, autoconf, automake and etc. You don't need this stuff if you already have a working PASE development environment. Otherwise the executables are statically linked, and should run on any iSeries from V4R5M0 onwards.

iSeries_Buildtools

If you are on a really hamstrung iSeries, here are some unzip tools to get you started. They are statically linked and should execute in PASE or QShell on any iSeries from V4R5M0 onwards. tar, bzip2 and xz are included here. With those you can extract and untar the buildTools archive above and you should be away. Unzip them on a PC and ftp to somewhere in PASE (/home/myProfile is a good place). 

Archive tools

The actual compiler: Binutils V2.24 GCC V4.8.2, targets AIX 5.1.0.0 which should create PASE / QShell exectables that run on any iSeries from V4R5M0 onwards. This needs to live in /opt/igcc, however in PASE / (root) is not a case sensitive file system, so I recommend you create (with QP2TERM shell or even QShell) a /QOpenSys/opt directory, and symlink this to / i.e. "mkdir /QOpenSys/opt; ln -s /opt /QOpensys/opt" before you unzip the stuff.

WARNING This file contains parts of the ISeries OS specifically the PASE / AIX compatability libc libraries and headers. DO NOT copy or move the /opt/igcc/usr directory or any bits inside of that directory to / or /usr or /QOpensys/ or you will break your iSeries!

iSeries_GCC

 

For the really interested - Build parameters follow: (these builds are always "out of source tree" hence the ../gnuSource). Note that gmp-5.1.3, mpc-1.0.2 and mpfr-3.1.2 were symlinked (or copied if you are on windows) into the gcc-4.8.2 directory as gmp, mpc and mpfr respectively. Compiler lives in /opt/igcc, and directory /opt/igcc/usr is prepopulated with the iSerises header files and libraries as detailed above.

../gnuSource/binutils-2.24/configure --with-pkgversion=DDT --prefix=/opt/igcc --with-sysroot=/opt/igcc --host=powerpc-ibm-aix5.1.0.0 --target=powerpc-ibm-aix5.1.0.0 --disable-nls  --with-lib-path=/opt/igcc/usr/lib CFLAGS=-D_ISOC99_SOURCE CXXFLAGS=-D_ISOC99_SOURCE

../gnuSource/gcc-4.8.2/configure --prefix=/opt/igcc --with-sysroot=/opt/igcc --with-pkgversion=DDT --disable-bootstrap --disable-multilib --disable-nls --host=powerpc-ibm-aix5.1.0.0 --target=powerpc-ibm-aix5.1.0.0 --enable-shared=no --disable-lto-plugin --disable-libsanitizer --disable-boehm-gc --disable-libmudflap --disable-libgcj --enable-languages=c,c++,fortran,lto,objc,obj-c++

Print viewSitemapMailform