Compiling G95


General

Platform Notes


G95 uses the 4.0.1 release version of GCC. This version is known to work, but other versions might not.
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.

MinGW

Building with MinGW requires that the "Development" and "MinGW" packages are installed. Also requires bison, gcc-core, flex, 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.