Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (26 sloc) 1.39 KB
How to compile G95 with GCC
G95 now includes code to interface with GCC for code generation.
First you need to get a copy of the GCC source tree. G95 uses SIMPLE
trees, so you'll need tree-ssa-20020619-branch from GCC CVS.
$ cvs -d login
(no password)
$ cvs -z9 -d co -r tree-ssa-20020619-branch -D 1/4/2003 gcc
G95 requires the GMP library (v3) for its internal numerics.
Configure it and build it.
Create $GCC_SRC/gcc/f95/ and copy all the g95 files into it (or
symlink it). Apply the gcc_config.patch to the top-level gcc source
The patch changes gcc's, so cd to '$GCC_SRC/gcc' and run
'autoconf' to get a new configure script.
cd to $GCC_SRC and Configure GCC as normal with the arguments:
--enable-languages=c,f95 --with-gmp-dir=<top level GMP directory> --disable-shared
Don't use the G95 configure system.
Configure and build the runtime library in g95/runtime. This leaves
libf95.a in the top level directory.
When using 'g95' to link programs the runtime libraries must be linked
in. Use -L <dir> -lf95 and possibly -lm. Proper installation coming
To compile Fortran 77 source with g95 you need to specify -x f95,
otherwise g77 will be used. This will generate "Fortran compiler not
installed on this system" if you did not compile g77.