Eeveelution / gcc-aix-ia64

Restoration of GCC for AIX/ia64

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GCC 3 for AIX/ia64

This repository contains an attempt to resurrect GCC for AIX5L IA64. Currently it consists of GCC 3.0.1 patched with Timothy Wall's patch from 2001, see here.

This is a part of a wider effort to revive AIX/ia64 started on NCommander's Discord. For more information, see the related wiki page.

Building

A cross compiler can be built the usual way. For x86-64 hosts a 32-bit build using --build and --host set to i686-unknown-linux-gnu is required, since GCC 3.0.1 pre-dates x86-64 support in GCC.

Currently, only a C and Fortran compiler can be built. This can be done like this, assuming $PREFIX is where binutils 2.12 targeting ia64-ibm-aix are:

$ ./fix-timestamps.sh
$ mkdir build && cd build
$ ../configure --prefix=$PREFIX --enable-languages=c,f77 -target=ia64-ibm-aix
$ make all-gcc
$ make install-gcc

To be able to actually use your compiler to compile and link code, you also need some files from an AIX installation, namely those in directories /usr/include, /usr/lib/ia64l64, and /usr/ccs/lib/ia64l64. Include files should be put in $PREFIX/ia64-ibm-aix/include, library files in $PREFIX/ia64-ibm-aix/lib (no need to create a ia64l64 subfolder there).

GCC 3 cannot recognize x86_64 systems, a workaround is running configure to target i686, provided you have a multilib system with corresponding development packages installed:

$ CC='gcc -m32' ../configure ... --build=i686-unknown-linux-gnu --host=i686-unknown-linux-gnu

Usage

After the compiler is built, installed and the includes and libraries are properly set up (see above), you can start using the compiler. Here is an example of building Hello world, assuming $PREFIX/bin is in PATH:

$ ia64-ibm-aix-gcc hello.c -o hello-gcc
$ file hello-gcc
hello-gcc: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), dynamically linked, interpreter /usr/lib/ia64l64/libc.so.1, not stripped
$ ls -l hello-gcc
-rwxr-xr-x. 1 tglozar tglozar 6317 Oct 26 18:50 hello-gcc

Issues

See Issues in GitHub repository.

About

Restoration of GCC for AIX/ia64

License:GNU General Public License v2.0


Languages

Language:C 62.1%Language:C++ 13.2%Language:Roff 6.3%Language:GCC Machine Description 6.1%Language:Java 5.5%Language:Makefile 1.3%Language:Shell 1.2%Language:Yacc 1.1%Language:Assembly 1.0%Language:HTML 0.5%Language:Fortran 0.4%Language:TeX 0.3%Language:RPC 0.3%Language:M4 0.2%Language:Scheme 0.1%Language:Objective-C 0.1%Language:Scilab 0.1%Language:DIGITAL Command Language 0.1%Language:Raku 0.0%Language:sed 0.0%Language:Pascal 0.0%Language:Perl 0.0%Language:Logos 0.0%Language:Awk 0.0%Language:Smarty 0.0%Language:Emacs Lisp 0.0%Language:GDB 0.0%Language:SAS 0.0%Language:JavaScript 0.0%Language:Module Management System 0.0%Language:CSS 0.0%Language:Forth 0.0%Language:Batchfile 0.0%