README patches for g77 in egcs 1.1 and mainline

Craig Burley burley@gnu.org
Tue Aug 11 02:02:00 GMT 1998


Dave, this changes the README files, which we talked about doing earlier.
Could you install these patches in both the mainline and 1.1 branches?

Also, if you want to make further changes after installing them, go
ahead, but cc me on the patches so I can apply them to the 0.5.24
version of g77 as well.

        tq vm, (burley)


*** g77-e/gcc/README.g77.~1~	Fri Apr  3 11:33:00 1998
--- g77-e/gcc/README.g77	Tue Aug 11 04:21:52 1998
***************
*** 1,80 ****
! 1998-03-08
  
! This directory contains the version 0.5.22 release of the GNU Fortran
! compiler.  The GNU Fortran compiler is free software.  See the file
! COPYING.g77 for copying permission.
! 
! * IMPORTANT: Things you *must* do are marked with a * at the beginning of
!   the line in this file!!!
! 
! * DO NOT send any email (reporting bugs, asking questions, etc.) to
!   <fortran@gnu.org> without *first* reading the g77 documentation,
!   using `info', Info mode in GNU Emacs, or a text viewer such as `more'.
!   The g77 documentation is in the files named `g77.info', `g77.info-1',
!   `g77.info-2', and so on in g77 `f' directory.  If these files are
!   not present or you can't find them, contact the person or organization
!   that put together the g77 distribution you are using (probably not the
!   FSF), or ask your system administrator for help.
! 
! This README is for GNU Fortran, and describes the files in the f/
! directory.  The f/ directory is intended to be a subdirectory of a
! gcc source tree.  These directories are referred to below as gcc/,
! which is the top-level directory containing the gcc back end, the
! gcc C front end, and other non-Fortran files, and gcc/f/, which
! contains all of the Fortran files.
! 
! * To build GNU Fortran, you must have a source distribution of gcc
!   version 2.7.2.3.  Do not attempt to use any other version
!   of gcc, because this version of g77 is designed to work only with
!   gcc version 2.7.2.3.
! 
! * Note that you must have source copies of these gcc distributions!!
!   You cannot build g77 just using binaries of gcc.  Also, unless you
!   are an expert, avoid using any distribution of gcc not identical to
!   the one distributed by the FSF.
  
! If you have just unpacked the g77 distribution, before proceeding,
  you must merge the contents of the g77 distribution with the appropriate
! gcc distribution on your system before proceeding.
  
! * Read and follow the instructions in g77-0.5.22/f/INSTALL that
    explain how to merge a g77 source directory into a gcc source
    directory.  You can use Info to read the same installation
    instructions via:
  
!     info -f g77-0.5.22/f/g77.info -n Unpacking
  
! The resulting directory layout includes the following, where gcc/ might be
! a link to, for example, gcc-2.7.2.3/:
  
!     gcc/                    Non-Fortran files in gcc (not part of g77*.tar)
      gcc/README.g77          This file
      gcc/f/                  GNU Fortran front end
!     gcc/f/gbe/              Patches required for gcc back end versions
!     gcc/f/runtime/          libf2c configuration and f2c.h file generation
!     gcc/f/runtime/libF77/   Non-I/O portion of libf2c
!     gcc/f/runtime/libI77/   I/O portion of libf2c
!     gcc/f/runtime/libU77/   Additional interfaces to libc for libf2c
! 
! gcc/f/ as a whole contains the program GNU Fortran (g77), plus a portion
! of the separate program f2c, which is in gcc/f/runtime.  NOTE: The libf2c
! code is not part of the program g77, just distributed with it.
  
! This directory is named gcc/f/ because it, along with its contents, is
! designed to be a subdirectory of a GNU CC (gcc) development directory.  I.e.
! when a gcc distribution is unpacked into a directory (named gcc/ for
! example), it typically contains subdirectories like gcc/config/ and
! gcc/cp/.  The latter is the subdirectory for the GNU C++ (g++) program.
! 
! Similarly, the g77 directory f/ is designed to be placed in gcc/ so that
! it becomes the subdirectory gcc/f/.  g77 is distributed as g77-someversion/f/
! so that unpacking the g77 distribution is done in the normal GNU way,
! resulting in a directory having the version number in the name.  However,
! to build g77, the g77 distribution must be merged with an appropriate gcc
! distribution, normally in a gcc directory, before configuring, building,
! and installing g77.
! 
! Applying g77 patches in the form of .diff files is done by typing
! `patch -p1 -d gcc' (where gcc/f/ is the active version).  That is,
  g77 patches are distributed in the same form, and at the same directory
  level, as patches to the gcc distribution.  (Note: make sure you're
--- 1,107 ----
! 1998-08-11
  
! This directory contains the egcs variant of version 0.5.24 of the
! GNU Fortran compiler (g77).  The GNU Fortran compiler is free software.
! See the file COPYING.g77 for copying permission.
  
! Currently, two variants of g77 exist.  One is the Free Software Foundation
! (FSF) variant.  The other is the egcs variant.  As of egcs version 1.1,
! these variants are kept fairly similar in most respects.  Pertinent
! differences, such as the layout of the source code, are specified below.
! 
! Below, `[FSF]' denotes information applicable to only the FSF variant of
! g77, while `[egcs]' denotes egcs-only information.
! 
! 
! * IMPORTANT: Things you *must* do (or avoid) are marked with a * at the
!   beginning of the line in this file!!!
! 
! 
! The email address to which bugs are to be reported is either
! [FSF] <fortran@gnu.org> or [egcs] <egcs-bugs@cygnus.com>.
! 
! * *DO NOT* send any email (reporting bugs, asking questions, etc.) to
!   either of these addresses without *first* reading the g77 documentation.
!   Use `info', Info mode in GNU Emacs, or a text viewer such as `more' to
!   do this.
! 
!   The g77 documentation is in the source files named `g77.info',
!   `g77.info-1', `g77.info-2', and so on in the `f' subdirectory.  If these
!   files are not present or you can't find them, contact the person or
!   organization that put together the g77 distribution you are using (probably
!   not the FSF or egcs), or ask your system administrator for help.
! 
! 
! This README applies to only the g77-specific portions of the source-code
! tree that contains it.  These portions include:
! 
!   -  The README.g77 and [FSF] COPYING.g77 files, in this directory, "this
!      directory" being [FSF] the top-level directory containing a g77
!      distribution or [egcs] the gcc/ subdirectory of an egcs distribution.
! 
!   -  The g77 front end, in the f/ subdirectory of this directory.
! 
!   -  The libg2c library, in [FSF] the f/runtime/ subdirectory of this
!      directory or [egcs] the libf2c/ directory under the top-level
!      directory of the egcs distribution.
! 
! 
! * To build g77, you must have a source distribution of [FSF] gcc
!   version 2.8 or [egcs] egcs version 1.1.  Do not attempt to use
!   any other version of gcc or egcs, because this version of g77 is
!   designed to work with only those versions.
! 
!   Note that you must have *source* copies of the gcc or egcs distribution!
!   You cannot build g77 just using binaries of gcc or egcs.  Also, unless
!   you are an expert, avoid using any distribution of gcc or egcs not
!   identical to the ones distributed by the FSF and Cygnus Support,
!   respectively.  The primary FSF distribution site is:
! 
!     < ftp://ftp.gnu.org/pub/gnu/ >
! 
!   The primary egcs distribution site is:
! 
!     < ftp://ftp.cygnus.com/pub/egcs/ >
! 
!   Both of these sites have approved mirror sites from which valid
!   distributions also may be obtained.
! 
! * Do not attempt to combine the egcs version of g77 with the FSF
!   gcc distribution, or the FSF version of g77 with the egcs gcc
!   distribution.  Although the differences are minor, they might
!   be sufficient to prevent g77 from building properly, or from
!   working properly if the build appears to succeed.
! 
! [FSF] g77 is distributed as g77-<version>/f/ so that unpacking the g77
! distribution is done in the normal GNU way, resulting in a directory having
! the version number in the name.  However, to build g77, the g77 distribution
! must be merged with an appropriate gcc distribution, normally in a gcc
! source directory, before configuring, building, and installing g77.
! 
! [FSF] If you have just unpacked the g77 distribution, before proceeding,
  you must merge the contents of the g77 distribution with the appropriate
! gcc distribution on your system.
  
! * [FSF] Read and follow the instructions in f/INSTALL that
    explain how to merge a g77 source directory into a gcc source
    directory.  You can use Info to read the same installation
    instructions via:
  
!     info -f f/g77.info -n Unpacking
  
! [FSF] The resulting directory layout includes the following, where gcc/
! might be a link to, for example, gcc-2.8.1/:
  
!     gcc/                    Non-g77 files in gcc
!     gcc/COPYING.g77         A copy of the GPL, under which g77 is licensed
      gcc/README.g77          This file
      gcc/f/                  GNU Fortran front end
!     gcc/f/runtime/          libg2c configuration and g2c.h file generation
!     gcc/f/runtime/libF77/   Non-I/O portion of libg2c
!     gcc/f/runtime/libI77/   I/O portion of libg2c
!     gcc/f/runtime/libU77/   Additional interfaces to libc for libg2c
  
! [FSF] Applying g77 patches in the form of .diff files is done by typing
! `patch -p1 -d gcc' (where gcc/ contains the f/ subdirectory).  That is,
  g77 patches are distributed in the same form, and at the same directory
  level, as patches to the gcc distribution.  (Note: make sure you're
*************** using GNU patch, version 2.5 or later!  
*** 82,133 ****
  have trouble with g77-related patches.)
  
! gcc/f/ has text files that document the Fortran compiler, source
  files for the GNU Fortran Front End (FFE), and some other stuff.
  
! gcc/f/gbe/ has patch files for various versions of gcc, primarily
! needed to patch the GNU compiler Back End (GBE) to fix and improve it
! for use with g77.  If a patch file exists for the version of gcc you
! want to build along with g77, you MUST apply the patch before building
! g77 with that version or g77 will not build or work properly.*
  
! * Read gcc/f/gbe/README for more information.
  
! gcc/f/runtime/ contains the run-time libraries for the f2c program, also used
! by g77, and referred to as libf2c (though libf2c is really a combination of
! two distinct libraries, libF77 and libI77 -- in g77, this distinction is
! not made, and, further, Dave Love's implementation of libU77 is added
! to the mix).  This separate subdirectory is not part of the program g77, just
! distributed with it.  Some new files have been added to this subdirectory
! and some minor changes made to the files contained therein, to fix some
! bugs and facilitate automatic configuration, building, and installation of
! libf2c for use by g77 users.  See gcc/f/runtime/README for more information.
  
! gcc/f/BUGS lists some important bugs known to be in g77.  Or:
  
-   info -f gcc/f/g77.info -n "Actual Bugs"
  
! gcc/f/ChangeLog lists recent changes to g77 internals.
  
! gcc/f/INSTALL describes how to build and install GNU Fortran.  Or:
  
!   info -f gcc/f/g77.info -n Installation
  
! gcc/f/NEWS contains the per-release changes (not just user-visible ones
! seen in gcc/f/DOC) listed in the ~fortran/.plan file.  Or:
  
!   info -f gcc/f/g77.info -n News
  
! * Read gcc/f/BUGS, gcc/f/INSTALL, and gcc/f/NEWS at the very least!
!   All users of g77 (not just installers) should read gcc/f/g77.info*
    as well, using the `more' command if neither the `info' command,
    nor GNU Emacs (with its Info mode), are available, or if they
!   aren't yet accustomed to using these tools.
! 
! If you want to get into the FFE code, which lives entirely in gcc/f/, here
! are a few clues.  The file g77.c is the stand-alone source file for the
! `g77' command driver only -- this just invokes the `gcc' command, so it has
! nothing to do with the rest of the code in g77.  Most of the code
! ends up in an executable named `f771', which does the actual compiling,
! so it has the FFE merged with the gcc back end.
  
  The file parse.c is the source file for main() for a stand-alone FFE and
--- 109,220 ----
  have trouble with g77-related patches.)
  
! [egcs] The egcs version of g77 is distributed already merged with
! the rest of egcs (such as the gcc back end).
! 
! [egcs] The resulting directory layout includes the following, where egcs/
! might be a link to, for example, egcs-1.1/:
! 
!     egcs/gcc/               Non-g77 files in gcc
!     egcs/gcc/README.g77     This file
!     egcs/gcc/f/             GNU Fortran front end
!     egcs/libf2c/            libg2c configuration and g2c.h file generation
!     egcs/libf2c/libF77/     Non-I/O portion of libg2c
!     egcs/libf2c/libI77/     I/O portion of libg2c
!     egcs/libf2c/libU77/     Additional interfaces to libc for libg2c
! 
! [egcs] Applying g77-specific patches to egcs is done the same way as
! applying other egcs patches.
! 
! 
! Below, `libf2c/' shall denote [FSF] gcc/f/runtime/ or [egcs] egcs/libf2c/,
! while `f/' shall denote [FSF] the rest of gcc/f/ or [egcs] egcs/gcc/f/.
! 
! 
! Components of note in g77 are described below.
! 
! f/ as a whole contains the program GNU Fortran (g77), while libf2c/
! contains a portion of the separate program f2c.  Note: The libf2c
! code is not part of the program g77, just distributed with it.
! 
! f/ contains text files that document the Fortran compiler, source
  files for the GNU Fortran Front End (FFE), and some other stuff.
+ The g77 compiler code is placed in f/ because it, along with its contents,
+ is designed to be a subdirectory of a GNU CC (gcc) source directory, gcc/,
+ which is structured so that language-specific front ends can be "dropped
+ in" as subdirectories.  The C++ front end (g++), is an example of this --
+ it resides in the cp/ subdirectory.  Note that the C front end (also
+ referred to as gcc) is an exception to this, as its source files reside
+ in the gcc/ directory itself.
+ 
+ libf2c/ contains the run-time libraries for the f2c program, also used
+ by g77.  These libraries normally referred to collectively as libf2c.
+ When built as part of g77, libf2c is installed under the name libg2c to avoid
+ conflict with any existing version of libf2c, and thus is often referred
+ to as libg2c when the g77 version is specifically being referred to.
  
! The netlib version of libf2c/ contains two distinct libraries, libF77 and
! libI77, each in their own subdirectories.  In g77, this distinction is not
! made, beyond maintaining the subdirectory structure in the source-code tree.
  
! libf2c/ is not part of the program g77, just distributed with it.  It
! contains files not present in the official (netlib) version of libf2c,
! and also contains some minor changes made from libf2c, to fix some bugs,
! and to facilitate automatic configuration, building, and installation of
! libf2c (as libg2c) for use by g77 users.
  
! * See libf2c/README for more information, including licensing conditions
!   governing distribution of programs containing code from libg2c.
  
! libg2c, g77's version of libf2c, adds Dave Love's implementation of
! libU77, in the libf2c/libU77/ directory.  This library is distributed
! under the GNU Library General Public License (LGPL) -- see the
! file libf2c/libU77/COPYING.LIB for more information, as this license
! governs distribution conditions for programs containing code from
! this portion of the library.
  
  
! Files of note in g77 are described below.
  
! f/BUGS lists some important bugs known to be in g77.  Or:
  
!   info -f f/g77.info -n "Actual Bugs"
  
! f/ChangeLog lists recent changes to g77 internals.
  
! libf2c/ChangeLog lists recent changes to libg2c internals.
  
! [FSF] f/INSTALL describes how to build and install GNU Fortran.  Or:
! 
!   info -f f/g77.info -n Installation
! 
! f/NEWS contains the per-release changes.  These include the user-visible
! changes described under "Changes" in the g77 documentation, plus internal
! changes of import.  Or:
! 
!   info -f f/g77.info -n News
! 
! * All users of g77 (not just installers) should read f/g77.info*
    as well, using the `more' command if neither the `info' command,
    nor GNU Emacs (with its Info mode), are available, or if they
!   aren't yet accustomed to using these tools.  Read f/BUGS and f/NEWS
!   plus, if you are planning on building or installing the FSF version
!   of g77, f/INSTALL, at the very least!  All of these files are
!   readable as "plain text" files.
! 
! * Also see < ftp://alpha.gnu.org/g77.plan > for up-to-date information
!   regarding g77 bug reports, known bugs, bug-fixes, and new versions.
! 
! 
! The rest of this file is of note to only those who wish to
! debug, modify, or test the FFE (in conjunction with the gcc back end).
! 
! If you want to explore the FFE code, which lives entirely in f/, here
! are a few clues.  The file g77spec.c contains the g77-specific source code
! for the `g77' command only -- this just forms a variant of the `gcc'
! command, so, just as the `gcc' command itself does not contain
! the C front end, the `g77' command does not contain the Fortran front
! end (FFE).  The FFE code ends up in an executable named `f771', which
! does the actual compiling, so it contains the FFE plus the gcc back end
! (the latter to do most of the optimization, and the code generation).
  
  The file parse.c is the source file for main() for a stand-alone FFE and
*************** interface to the target back end (curren
*** 159,163 ****
  ste.c, which contains code for implementing recognized executable statements
  in the target back end (again currently either FFE or GBE); src.h and src.c,
! which describe information on the format(s) of source files (like whether
  they are never to be processed as case-insensitive with regard to Fortran
  keywords); and proj.c, which contains whatever code is needed to support
--- 246,250 ----
  ste.c, which contains code for implementing recognized executable statements
  in the target back end (again currently either FFE or GBE); src.h and src.c,
! which describe information on the format(s) of source files (such as whether
  they are never to be processed as case-insensitive with regard to Fortran
  keywords); and proj.c, which contains whatever code is needed to support
*************** the compiler is in the second pass, othe
*** 174,176 ****
  a bug in g77 until a fix is available.)
  
! Any questions or comments on these topics, email <fortran@gnu.org>.
--- 261,263 ----
  a bug in g77 until a fix is available.)
  
! Any questions or comments on these topics?  Read the g77 documentation!
*** g77-e/libf2c/README.~1~	Mon Jun 15 03:51:59 1998
--- g77-e/libf2c/README	Tue Aug 11 04:54:02 1998
***************
*** 1,37 ****
! 1998-04-20
  
! This directory contains the f2c library packaged for use with g77 to configure
! and build automatically (in principle!) as part of the top-level configure and
! make steps.  This depends on the makefile and configure fragments in ../f.
! g77 names this library `libg2c' to avoid conflict with existing copies
! of `libf2c' on a system.
! 
! Some small changes have been made to the f2c distributions of lib[FI]77 which
! come from <ftp:bell-labs.com/netlib/f2c/> and are maintained (excellently) by
! David M. Gay <dmg@bell-labs.com>.  See the Notice files for copyright
! information.  I'll try to get the changes rolled into the f2c distribution.
  
  Files that come directly from netlib are either maintained in the
! gcc/f/runtime/ directory under their original names or, if they
! are not pertinent for g77's version of libf2c, under their original
! names with `.netlib' appended.  For example, gcc/f/runtime/permissions.netlib
! is a copy of f2c's top-level`permissions' file in the netlib distribution.
! In this case, it applies only to the relevant portions of the libF77/ and
! libI77/ directories; it does not apply to the libU77/ directory, which is
! distributed under different licensing arrangements.  Similarly,
! the `makefile.netlib' files in libF77/ and libI77/ are copies of
! the respective `makefile' files in the netlib distribution, but
! are not used when building g77's version of libf2c.
  
! The `README.netlib' files in libF77/ and libI77/ thus might be
  interesting, but should not be taken as guidelines for how to
  configure and build libf2c in g77's distribution.
  
! The packaging for auto-configuration was done by Dave Love <d.love@dl.ac.uk>.
! Minor changes have been made by James Craig Burley <burley@gnu.org>,
! who probably broke things Dave had working.  :-)
  
! Among the user-visible changes (choices) g77 makes in its
! version of libf2c:
  
  -  f2c.h configured to default to padding unformatted direct reads
--- 1,40 ----
! 1998-08-11
  
! This directory contains the libf2c library packaged for use with g77
! to configure and build automatically (in principle!) as part of the
! top-level configure and make steps.  g77 names this library `libg2c'
! to avoid conflicts with existing copies of `libf2c' on a system.
! 
! Some small changes have been made vis-a-vis the netlib distribution of
! libf2c, which comes from <ftp:bell-labs.com/netlib/f2c/> and is maintained
! (excellently) by David M. Gay <dmg@bell-labs.com>.  See the Notice files
! for copyright information.  We usually try to get g77-specific changes
! rolled back into the libf2c distribution.
  
  Files that come directly from netlib are either maintained in the
! libf2c directory under their original names or, if they are not pertinent
! for g77's version of libf2c, under their original names with `.netlib'
! appended.  For example, permissions.netlib is a copy of f2c's top-level
! `permissions' file in the netlib distribution.  In this case, it applies
! only to the relevant portions of the libF77/ and libI77/ directories; it
! does not apply to the libU77/ directory, which is distributed under
! different licensing arrangements.  Similarly, the `makefile.netlib' files
! in the libF77/ and libI77/ subdirectories are copies of the respective
! `makefile' files in the netlib distribution, but are not used when
! building g77's version of libf2c.
  
! The README.netlib files in libF77/ and libI77/ thus might be
  interesting, but should not be taken as guidelines for how to
  configure and build libf2c in g77's distribution.
  
! * Read permissions.netlib for licensing conditions that apply to
!   distributing programs containing portions of code in the libF77/ and
!   libI77/ subdirectories.  Also read disclaimer.netlib.
! 
! * Read libU77/COPYING.LIB for licensing conditions that apply to
!   distributing programs containing portions of code in the libU77/
!   subdirectory.
  
! Among the user-visible changes (choices) g77 makes in its version of libf2c:
  
  -  f2c.h configured to default to padding unformatted direct reads
*************** version of libf2c:
*** 47,48 ****
--- 50,109 ----
  -  dtime_() and etime_() are from Dave Love's libU77, not from
     netlib's libF77.
+ 
+ -  Routines that are intended to be called directly via user code
+    (as in `CALL EXIT', but not the support routines for `OPEN')
+    have been renamed from `<name>' to `G77_<name>_0'.  This, in
+    combination with g77 recognizing these names as intrinsics and
+    calling them directly by those names, reduces the likelihood of
+    interface mismatches occurring due to use of compiler options
+    that change code generation, and permits use of these names as
+    both intrinsics and user-supplied routines in applications (as
+    required by the Fortran standards).  f2cext.c contains "jacket"
+    routines named `<name>' that call `G77_<name>_0', to support
+    code that relies on calling the relevant routines as `EXTERNAL'
+    routines.
+ 
+    Note that the `_0' in the name denotes version 0 of the *interface*,
+    not the *implementation*, of a routine.  The interface of a
+    given routine *must not change* -- instead, introduce a new copy
+    of the code, with an increment (e.g. `_1') suffix, having the
+    new interface.  Whether the previous interface is maintained is
+    not as important as ensuring the routine implementing the new
+    interface is never successfully linked to a call in existing,
+    e.g. previously compiled, code that expects the old interface.
+ 
+ -  Version.c in the subdirectories contains g77-specific version
+    information and a routine (per subdirectory) to print both the
+    netlib and g77 version information when called.  The `g77 -v'
+    command is designed to trigger this, by compiling, linking, and
+    running a small program that calls the routines in sequence.
+ 
+ -  libF77/main.c no longer contains the actual code to copy the
+    argc and argv values into globals or to set up the signal-handling
+    environment.  These have been removed to libF77/setarg.c and
+    libF77/setsig.c, respectively.  libF77/main.c contains procedure
+    calls to the new code in place of the code itself.  This should
+    simplify linking executables with a main() function other than
+    that in libF77/main.c (such as one written by the user in C or
+    C++).  See the g77 documentation for more information.
+ 
+ -  Complex-arithmetic support routines in libF77/ take a different approach
+    to avoiding problems resulting from aliased input and output arguments,
+    which should avoid particularly unusual alias problems that netlib
+    libf2c might suffer from.
+ 
+ -  libF77/signal_.c supports systems with 64-bit pointers and 32-bit
+    integers.
+ 
+ -  I/O routines in libI77/ have code to detect attempts to do recursive
+    I/O more "directly", mainly to lead to a clearer diagnostic than
+    typically occurs under such conditions.
+ 
+ -  Formatted-I/O routines in libI77/ have code to pretty-print a FORMAT
+    string when printing a fatal diagnostic involving formatted I/O.
+ 
+ -  libI77/open.c supports a more robust, perhaps more secure, method
+    of naming temporary files on some systems.
+ 
+ -  Some g77-specific handling of building under Microsoft operating
+    systems exists, mainly in libI77/.



More information about the Gcc-patches mailing list