g77
Tobias Burnus
burnus@net-b.de
Sun Aug 19 09:20:00 GMT 2007
Hi Granville,
Granville Sewell wrote:
> I'm trying to decide if my software for Linux and Solaris should be
> compiled using g77 or gfortran (it's basically a library, so need to be
> compatible with whichever compiler users have on their system).
gfortran replaced g77 with GCC 4.0.0. Thus any system which has GCC 2.x
or 3.x cannot have gfortran while any system which has gcc 4.x cannot
have g77. (Though I know some Linux distributions which shipped g77 of
gcc 3.3.x even though their system compiler was gcc 4.x.)
If possible avoid gfortran of GCC 4.0.x as it is rather buggy.
If you ship your library as source, you should not have any problems as
both g77 and gfortran compile all* standard conforming Fortran 77
programs and gfortran supports (almost) all features of g77. (* modulo
bugs of cause.)
If you ship the library as binary, you have the additional problem that
the different gfortran versions have incompatible libaries. gfortran 4.1
comes with libgfortran.so.1, gfortran 4.2 with libgfortran.so.2 and
gfortran 4.3 comes with libgfortran.so.3. (gfortran 4.4 will be
downwards compatible to 4.3 due to versioned symbols.)
If you have the choice, I would use gfortran: (a) it is actively being
developed, (b) I think it has better diagnostics, (c) it seems to
support more vendor extensions and (d) it support Fortran 90/95 and part
of Fortran 2003.
(For (b) I'm not completely sure, I used g77 only for a few hours and
started with Fortran 9x; but at least I failed to get with -W* any
warning if lines were truncated etc.)
Tobias
More information about the Fortran
mailing list