GCC Compiler Installation Instructions

This page is to aid in the installation of the OS/390 GCC Compiler. These instructions are preliminary; so, if you have additional problems or comments, please contact me.

To install the OS/390 USS binary distributions

  1. Transfer the compressed tar file, in binary mode, to the OS/390 system. I use the "/tmp" directory.

    $ ftp os390system
    ftp> cd /tmp
    ftp> bin
    ftp> put gcc-3.2-bin-DATE.tar.Z
    ftp> quit

  2. Change directory to the root directory (/).

    $ cd /

  3. Extract the tar file contents. (You may need to have super user privilege to do this)

    $ pax -rzv -f /tmp/gcc-3.2-bin-DATE.tar.Z

To install the source distributions

  1. Transfer the compressed tar file, in binary mode, to your system.

    $ ftp os390system
    ftp> cd /your_source_dir
    ftp> bin
    ftp> put gcc-addons.tar.gz
    ftp> put gcc-3.2.tar.gz
    ftp> quit

  2. On the OS/390 system, Using gnu unzip, decompress the file.

    $ cd /your_source_dir
    $ gunzip gcc-addons.tar.gz
    $ gunzip gcc-3.2.tar.gz

  3. Extract the tar file contents, you MUST use pax with the ASCII to EBCDIC conversion option.

    $ pax -rv -o from=ISO8859-1,to=IBM-1047 -f gcc-addons.tar
    $ pax -rv -o from=ISO8859-1,to=IBM-1047 -f gcc-3.2.tar

  4. Create the support binaries (It is assumed that you are not using IBM's C).

    $ cd gcc-addons/support/openedition
    $ make NOCC
    $ make installNOCC

To build the compiler on USS from the source distribution

  1. You must have the binary distribution, see above, installed to build gcc. However, gcc can't compile itself; so you have to rename the one in /usr/local/bin to something else prior to the configure step.

    $ cd /usr/local/bin
    $ mv gcc gcc.orig

  2. On USS you need to remove the bison output files, so that they can be regenerated with the EBCDIC collating sequence.

    $ cd /your_source_dir/gcc-3.2
    $ sh cleany.sh

  3. Create a binary directory in which the compiler will be built.

    $ cd /your_source_dir
    $ mkdir gcc-bin

  4. Configure the compiler.

    $ cd gcc-bin
    $ ../gcc-3.2/configure --enable-lanuages=c

  5. Now make the compiler.

    $ make

  6. Install the compiler:

    $ mkdir -p /usr/local/lib/gcc-lib/i370-ibm-openedition/3.2/
    $ cd /your_source_dir/gcc-bin/gcc
    $ cp cc1 collect2 cpp cpp0 gcov tradcpp0 specs \
    $ cp xgcc /usr/local/bin/gcc

  7. Install the include headers:

    $ cd /usr/local/lib/gcc-lib/i370-ibm-openedition/3.2/
    $ pax -rv -f /your_source_dir/gcc-addons/include.tar

  8. Install the gcc main module:

    $ cd /your_source_dir
    $ pax -rv -f gcc-addons.tar \
    $ cp gcc-addons/support/openedition/gccmain.o \

To build the compiler using the Dignus support

To build the compiler with Dignus Cross Support look at these instructions.

This page is maintained by David Pitts. Please email with comments and corrections.
Last modified 2003/04/10.