Compiling G95


General
Platform Notes


G95 uses the 4.x release version of GCC. The 4.0.1, 4.0.2 and 4.0.3 stable versions are known to work, other versions might not.

This version is known to work, but other versions might not.


Configure the compiler and library with --enable-F=yes to compile g95 with the F restrictions.

The build process is still pretty crude though I am sure it will be smoothed over as time goes by.


Platform notes

OSX

Compile g95 with CFLAGS=-no-cpp-precomp. This prevents the special preprocessor from kicking in and messing things up.

AIX

It may be necessary to configure with CFLAGS=-liconv.

MinGW

Building with MinGW requires that the "Development" and "MinGW" packages are installed. Also requires gcc-core, gettext, and make. To pull source code from a repository also requires cvs.
  1. Set-up the build tools:
  2. Set-up the build directories and environment:
  3. Get and build GCC:
  4. Configure the g95 source distribution:

Cygwin

  1. Set-up the build tools:
  2. Set-up the build directory:
  3. Get and build GCC:
  4. If all goes well this will result in Cygwin builds of libbackend.a and libgcc.a needed for compiling g95.
  5. Configure the g95 source distribution:

Support of MinGW targets under Cygwin

  1. Complete successfully the Cygwin build of G95
  2. Configure the G95 library to support MinGW within Cygwin
  3. Build the G95 library to support MinGW within Cygwin
  4. Enable the MinGW compliant library for Cygwin G95:
  5. The -mno-cygwin should now be supported by Cygwin g95

Build a dll version of g95

A script to download and unpack the g95 source, and build a version of g95 that uses dlls, has been contributed by Dave Miles.