Restore circa-0.5.22 capabilities of `g77' driver:
authorCraig Burley <burley@gnu.org>
Mon, 15 Jun 1998 07:37:33 +0000 (03:37 -0400)
committerDave Love <fx@gcc.gnu.org>
Mon, 15 Jun 1998 07:37:33 +0000 (07:37 +0000)
Thu May 28 21:32:18 1998  Craig Burley  <burley@gnu.org>
Restore circa-0.5.22 capabilities of `g77' driver:
* Make-lang.in (g77spec.o): Depend on f/version.h.
(g77version.o): New rule to compile g77 version info.
(g77$(exeext)): Depend on and link in g77version.o.
* g77spec.c: Rewrite to be more like 0.5.22 version
of g77.c, making filtering of command line smarter
so mixed Fortran and C (etc.) can be compiled, verbose
version info can be obtained, etc.
* lang-specs.h (f77-version): New "language" to support
"g77 -v" command under new gcc 2.8 regime.
* lex.c (ffelex_file_fixed): If -fnull-version, just
substitute a "source file" that prints out version info.
* top.c, top.h: Support -fnull-version.
* lang-specs.h: Use "%O" instead of OO macro to specify
object extension.  Remove old stringizing cruft.
* Make-lang.in (g77.c, g77spec.o, g77.o, g77$(exeext),
g77-cross$(exeext), f771,
$(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi,
$(srcdir)/f/intdoc.texi,
f77.install-common, f77.install-info, f77.install-man,
f77.uninstall, $(G77STAGESTUFF), f77.stage1, f77.stage2,
f77.stage3, f77.stage4, f77.distdir): Don't do anything
unless user specified "f77" or "F77" in $LANGUAGES either
during configuration or explicitly.  For convenience of
various tests and to work around lack of the assignment
"LANGUAGES=$(BOOT_LANGUAGES)" in the "make stage1" command
of "make bootstrap" in gcc, use a touch file named "lang-f77"
to communicate whether this is the case.
* Make-lang.in (F77_FLAGS_TO_PASS): Delete this macro,
replace with minimal expansion of its former self in
each of the two instances where it was used.
* Makefile.in (HOST_CC): Delete this definition.
* com.c (index, rindex): Delete these declarations.
* proj.h: (isascii): Delete this.
* Make-lang.in (f77.install-common): Warn if `f77-install-ok'
flag-file exists, since it no longer triggers any activity.
Rename libf2c.a and f2c.h to libg2c.a and g2c.h,
normalize and simplify g77/libg2c build process:
* Make-lang.in: Remove all support for overwriting
/usr/bin/f77 etc., or whatever the actual names are
via $(prefix) and $(local_prefix).  (g++ overwrites
/usr/bin/c++, but then it's often the only C++ compiler
on the system; f77 often exists on systems that are
installing g77.)
(f77.realclean): Remove obsolete target.
(g77.c, g77$(exeext)): Minor changes to look more like g++'s
stuff.
(f771): Now built with srcdir=gcc/f, not srcdir=gcc, to be
more like g++ and such.
(f/Makefile): Removed, as g++ doesn't need this rule.
(f77.install-common): No longer install f77, etc.
(f77.install-man): No longer install f77.1.
(f77.uninstall): No longer uninstall f77, f77.1, etc.
(f77.stage1, f77.stage2, f77.stage3, f77.stage4): Do work
only if "f77" appears in $(LANGUAGES).
(Note: gcc's Makefile.in's bootstrap target should set
LANGUAGES=$(BOOT_LANGUAGES) when making the stage1 target.)
* Makefile.in: Update vis-a-vis gcc/cp/Makefile.in.
(none): Remove.
(g77-only): Relocate.
(all.indirect, f771, *.o): Now assumes current directory
is this dir (gcc/f), not the parent directory.
(TAGS): Remove "echo 'parse.y,0'  >> TAGS ;" line.
* config-lang.in: Delete commented-out code.
Fix stagestuff definition.  Add more stuff to
diff_excludes definition.  Don't create any directories.
Set outputs to f/Makefile, to get variable substition
to happen (what does that really do, anyway?!).
* g77spec.c: Rename libf2c to libg2c.
* com.h: Remove all of the gcc back-end decls,
since egcs should have all of them correct.
* com.c: Include "proj.h" before anything else,
as that's how things are supposed to work.
* ste.c: Ditto.
* bad.c: Include "flags.j" here, since some diagnostics
check flag_pedantic_errors.
* Makefile.in (f/*.o): Rebuild dependencies via
deps-kinda.
* output.j: New source file.
* Make-lang.in (F77_SRCS): Update accordingly.
* Makefile.in (OUTPUT_H): Ditto.
(deps-kinda): Ditto.
* com.c: Include "output.j" here.
* lex.c: Ditto.

From-SVN: r20506

21 files changed:
gcc/f/ChangeLog
gcc/f/Make-lang.in
gcc/f/Makefile.in
gcc/f/bad.c
gcc/f/com.c
gcc/f/com.h
gcc/f/config-lang.in
gcc/f/g77.1
gcc/f/g77.texi
gcc/f/g77install.texi
gcc/f/g77spec.c
gcc/f/intdoc.c
gcc/f/lang-specs.h
gcc/f/lex.c
gcc/f/news.texi
gcc/f/output.j [new file with mode: 0644]
gcc/f/proj.h
gcc/f/ste.c
gcc/f/top.c
gcc/f/top.h
gcc/f/version.c

index 4f259ea60af0bbaeb1c0909b865a1f950a2391d6..00a4a4508138b44dcdd79221ffaf2351665ddcfb 100644 (file)
@@ -4,6 +4,7 @@ Wed Jun 10 13:17:32 1998  Dave Brolley  <brolley@cygnus.com>
        * top.c (ffe_decode_option): New argc/argv interface.
        * parse.c (yyparse): New argc/argv interface for ffe_decode_option.
        * com.c (lang_decode_option): New argc/argv interface.
+
 Mon Jun  1 19:37:42 1998  Craig Burley  <burley@gnu.org>
 
        * com.c (ffecom_init_0): Fix setup of INTEGER(KIND=7)
@@ -14,6 +15,106 @@ Mon Jun  1 19:37:42 1998  Craig Burley  <burley@gnu.org>
        Delete FFEGLOBAL_argsummaryPTR.
        * global.c, global.h: Delete FFEGLOBAL_argsummaryPTR.
 
+Thu May 28 21:32:18 1998  Craig Burley  <burley@gnu.org>
+
+       Restore circa-0.5.22 capabilities of `g77' driver:
+       * Make-lang.in (g77spec.o): Depend on f/version.h.
+       (g77version.o): New rule to compile g77 version info.
+       (g77$(exeext)): Depend on and link in g77version.o.
+       * g77spec.c: Rewrite to be more like 0.5.22 version
+       of g77.c, making filtering of command line smarter
+       so mixed Fortran and C (etc.) can be compiled, verbose
+       version info can be obtained, etc.
+       * lang-specs.h (f77-version): New "language" to support
+       "g77 -v" command under new gcc 2.8 regime.
+       * lex.c (ffelex_file_fixed): If -fnull-version, just
+       substitute a "source file" that prints out version info.
+       * top.c, top.h: Support -fnull-version.
+
+       * lang-specs.h: Use "%O" instead of OO macro to specify
+       object extension.  Remove old stringizing cruft.
+
+       * Make-lang.in (g77.c, g77spec.o, g77.o, g77$(exeext),
+       g77-cross$(exeext), f771,
+       $(srcdir)/f/g77.info, $(srcdir)/f/g77.dvi,
+       $(srcdir)/f/intdoc.texi,
+       f77.install-common, f77.install-info, f77.install-man,
+       f77.uninstall, $(G77STAGESTUFF), f77.stage1, f77.stage2,
+       f77.stage3, f77.stage4, f77.distdir): Don't do anything
+       unless user specified "f77" or "F77" in $LANGUAGES either
+       during configuration or explicitly.  For convenience of
+       various tests and to work around lack of the assignment
+       "LANGUAGES=$(BOOT_LANGUAGES)" in the "make stage1" command
+       of "make bootstrap" in gcc, use a touch file named "lang-f77"
+       to communicate whether this is the case.
+
+       * Make-lang.in (F77_FLAGS_TO_PASS): Delete this macro,
+       replace with minimal expansion of its former self in
+       each of the two instances where it was used.
+
+       * Makefile.in (HOST_CC): Delete this definition.
+
+       * com.c (index, rindex): Delete these declarations.
+
+       * proj.h: (isascii): Delete this.
+
+       * Make-lang.in (f77.install-common): Warn if `f77-install-ok'
+       flag-file exists, since it no longer triggers any activity.
+
+       Rename libf2c.a and f2c.h to libg2c.a and g2c.h,
+       normalize and simplify g77/libg2c build process:
+       * Make-lang.in: Remove all support for overwriting
+       /usr/bin/f77 etc., or whatever the actual names are
+       via $(prefix) and $(local_prefix).  (g++ overwrites
+       /usr/bin/c++, but then it's often the only C++ compiler
+       on the system; f77 often exists on systems that are
+       installing g77.)
+       (f77.realclean): Remove obsolete target.
+       (g77.c, g77$(exeext)): Minor changes to look more like g++'s
+       stuff.
+       (f771): Now built with srcdir=gcc/f, not srcdir=gcc, to be
+       more like g++ and such.
+       (f/Makefile): Removed, as g++ doesn't need this rule.
+       (f77.install-common): No longer install f77, etc.
+       (f77.install-man): No longer install f77.1.
+       (f77.uninstall): No longer uninstall f77, f77.1, etc.
+       (f77.stage1, f77.stage2, f77.stage3, f77.stage4): Do work
+       only if "f77" appears in $(LANGUAGES).
+       (Note: gcc's Makefile.in's bootstrap target should set
+       LANGUAGES=$(BOOT_LANGUAGES) when making the stage1 target.)
+       * Makefile.in: Update vis-a-vis gcc/cp/Makefile.in.
+       (none): Remove.
+       (g77-only): Relocate.
+       (all.indirect, f771, *.o): Now assumes current directory
+       is this dir (gcc/f), not the parent directory.
+       (TAGS): Remove "echo 'parse.y,0'  >> TAGS ;" line.
+       * config-lang.in: Delete commented-out code.
+       Fix stagestuff definition.  Add more stuff to
+       diff_excludes definition.  Don't create any directories.
+       Set outputs to f/Makefile, to get variable substition
+       to happen (what does that really do, anyway?!).
+       * g77spec.c: Rename libf2c to libg2c.
+
+       * com.h: Remove all of the gcc back-end decls,
+       since egcs should have all of them correct.
+
+       * com.c: Include "proj.h" before anything else,
+       as that's how things are supposed to work.
+       * ste.c: Ditto.
+
+       * bad.c: Include "flags.j" here, since some diagnostics
+       check flag_pedantic_errors.
+
+       * Makefile.in (f/*.o): Rebuild dependencies via
+       deps-kinda.
+
+       * output.j: New source file.
+       * Make-lang.in (F77_SRCS): Update accordingly.
+       * Makefile.in (OUTPUT_H): Ditto.
+       (deps-kinda): Ditto.
+       * com.c: Include "output.j" here.
+       * lex.c: Ditto.
+
 Mon May 25 03:34:42 1998  Craig Burley  <burley@gnu.org>
 
        * com.c (ffecom_expr_): Fix D**I and Z**I cases to
index 4ad6d825c1e8ccb5f572769a759df2e1ea28ba0d..b199b1a9f93e15b1f760ce3dc848eef7d7268aa9 100644 (file)
@@ -1,5 +1,5 @@
 # Top level makefile fragment for GNU Fortran.           -*-makefile-*-
-#   Copyright (C) 1995-1997 Free Software Foundation, Inc.
+#   Copyright (C) 1995-1998 Free Software Foundation, Inc.
 
 #This file is part of GNU Fortran.
 
@@ -15,8 +15,8 @@
 
 #You should have received a copy of the GNU General Public License
 #along with GNU Fortran; see the file COPYING.  If not, write to
-#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-#02111-1307, USA.
+#the Free Software Foundation, 59 Temple Place - Suite 330,
+#Boston, MA 02111-1307, USA.
 
 # This file provides the language dependent support in the main Makefile.
 # Each language makefile fragment must provide the following targets:
 #
 # It should also provide rules for:
 #
-# - making any compiler driver (eg: g77)
-# - the compiler proper (eg: f771)
+# - making any compiler driver (eg: g++)
+# - the compiler proper (eg: cc1plus)
 # - define the names for selecting the language in LANGUAGES.
 #
 # $(srcdir) must be set to the gcc/ source directory (not gcc/f/).
 #\f
-# Extra flags to pass to recursive makes (and to sub-configure).
-# Use different quoting rules compared with FLAGS_TO_PASS so we can use
-# this to set environment variables as well
-# Note that GCC_FOR_TARGET, GCC_FLAGS aren't in here -- treated separately.
-F77_FLAGS_TO_PASS = \
-       CROSS="$(CROSS)" \
-       AR_FLAGS="$(AR_FLAGS)" \
-       AR="$(AR)" \
-       BISON="$(BISON)" \
-       BISONFLAGS="$(BISONFLAGS)" \
-       CC="$(CC)" \
-       CFLAGS="$(CFLAGS)" \
-       X_CFLAGS="$(X_CFLAGS)" \
-       LDFLAGS="$(LDFLAGS)" \
-       LEX="$(LEX)" \
-       LEXFLAGS="$(LEXFLAGS)" \
-       MAKEINFO="$(MAKEINFO)" \
-       MAKEINFOFLAGS="$(MAKEINFOFLAGS)" \
-       RANLIB="$(RANLIB)" \
-       RANLIB_TEST="$(RANLIB_TEST)" \
-       SHELL="$(SHELL)" \
-       exec_prefix="$(exec_prefix)" \
-       prefix="$(prefix)" \
-       tooldir="$(tooldir)" \
-       bindir="$(bindir)" \
-       libsubdir="$(libsubdir)"
-#      "F77_FOR_BUILD=$(F77_FOR_BUILD)" \
-#      "F77FLAGS=$(F77FLAGS)" \
-#      "F77_FOR_TARGET=$(F77_FOR_TARGET)"
-
-# This flag controls whether to install (overwrite) f77 on this system,
-# and also whether to uninstall it when using the uninstall target.
-# As shipped, the flag is a test of whether the `f77_install_ok'
-# file exists in the build or source directories (top level), but
-# you can just change it here if you like.
-F77_INSTALL_FLAG = [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]
-
-# Actual names to use when installing a native compiler.
-F77_INSTALL_NAME = `t='$(program_transform_name)'; echo f77 | sed $$t`
+# Actual name to use when installing a native compiler.
 G77_INSTALL_NAME = `t='$(program_transform_name)'; echo g77 | sed $$t`
 
-# Actual names to use when installing a cross-compiler.
-F77_CROSS_NAME = `t='$(program_transform_cross_name)'; echo f77 | sed $$t`
+# Actual name to use when installing a cross-compiler.
 G77_CROSS_NAME = `t='$(program_transform_cross_name)'; echo g77 | sed $$t`
 #\f
 # Define the names for selecting f77 in LANGUAGES.
@@ -95,34 +56,62 @@ F77 f77: f771$(exeext)
   f77.install-normal \
   f77.install-common f77.install-info f77.install-man \
   f77.uninstall f77.mostlyclean f77.clean f77.distclean \
-  f77.maintainer-clean f77.realclean f77.stage1 f77.stage2 f77.stage3 \
-  f77.stage4 f77.distdir f77.rebuilt
+  f77.extraclean f77.maintainer-clean f77.distdir f77.rebuilt \
+  f77.stage1 f77.stage2 f77.stage3 f77.stage4
 
 g77.c: $(srcdir)/gcc.c
-       -rm -f $@
-       $(LN_S) $(srcdir)/gcc.c $@
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       if [ -f lang-f77 ]; then \
+         rm -f g77.c; \
+         $(LN_S) $(srcdir)/gcc.c g77.c; \
+       fi
 
-g77spec.o: $(srcdir)/f/g77spec.c
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/f/g77spec.c
+g77spec.o: $(srcdir)/f/g77spec.c $(srcdir)/f/version.h
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       if [ -f lang-f77 ]; then \
+         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/f/g77spec.c; \
+       fi
+
+g77version.o: $(srcdir)/f/version.c
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       if [ -f lang-f77 ]; then \
+         $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -o g77version.o \
+           $(srcdir)/f/version.c; \
+       fi
 
 # N.B.: This is a copy of the gcc.o rule, with -DLANG_SPECIFIC_DRIVER added.
 # It'd be nice if we could find an easier way to do this---rather than have
 # to track changes to the toplevel gcc Makefile as well.
 # We depend on g77.c last, to make it obvious where it came from.
 g77.o: $(CONFIG_H) multilib.h config.status $(lang_specs_files) g77.c
-       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-       $(DRIVER_DEFINES) \
-       -DLANG_SPECIFIC_DRIVER -c g77.c
+       if [ -f lang-f77 ]; then \
+         $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(DRIVER_DEFINES) \
+          -DLANG_SPECIFIC_DRIVER -c g77.c; \
+       fi
 
 # Create the compiler driver for g77.
-g77$(exeext): g77.o g77spec.o version.o choose-temp.o pexecute.o prefix.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g77.o g77spec.o prefix.o version.o \
-         choose-temp.o pexecute.o $(EXTRA_GCC_OBJS) $(LIBS)
+g77$(exeext): g77.o g77spec.o g77version.o version.o choose-temp.o pexecute.o prefix.o \
+  $(LIBDEPS) $(EXTRA_GCC_OBJS)
+       if [ -f lang-f77 ]; then \
+         $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ g77.o g77spec.o g77version.o \
+          version.o choose-temp.o pexecute.o prefix.o $(EXTRA_GCC_OBJS) $(LIBS); \
+       fi
 
 # Create a version of the g77 driver which calls the cross-compiler.
 g77-cross$(exeext): g77$(exeext)
-       -rm -f g77-cross$(exeext)
-       cp g77$(exeext) g77-cross$(exeext)
+       if [ -f lang-f77 ]; then \
+         rm -f g77-cross$(exeext); \
+         cp g77$(exeext) g77-cross$(exeext); \
+       fi
 
 F77_SRCS = \
  $(srcdir)/f/assert.j \
@@ -170,6 +159,7 @@ F77_SRCS = \
  $(srcdir)/f/malloc.h \
  $(srcdir)/f/name.c \
  $(srcdir)/f/name.h \
+ $(srcdir)/f/output.j \
  $(srcdir)/f/parse.c \
  $(srcdir)/f/proj.c \
  $(srcdir)/f/proj.h \
@@ -228,11 +218,11 @@ F77_SRCS = \
  $(srcdir)/f/where.c \
  $(srcdir)/f/where.h
 
-f771$(exeext): $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist f/Makefile
-       $(MAKE) -f f/Makefile $(FLAGS_TO_PASS) VPATH=$(srcdir) srcdir=$(srcdir) f771$(exeext)
-
-f/Makefile: $(srcdir)/f/Makefile.in $(srcdir)/configure
-       $(SHELL) config.status
+f771$(exeext): $(P) $(F77_SRCS) $(LIBDEPS) stamp-objlist
+       touch lang-f77
+       cd f; $(MAKE) $(FLAGS_TO_PASS) \
+         HOST_CC="$(HOST_CC)" HOST_CFLAGS="$(HOST_CFLAGS)" HOST_CPPFLAGS="$(HOST_CPPFLAGS)" \
+         ../f771$(exeext)
 
 #\f
 # Build hooks:
@@ -249,12 +239,25 @@ f77.dvi: f/g77.dvi
 f/g77.info: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
            $(srcdir)/f/g77install.texi $(srcdir)/f/news.texi \
            $(srcdir)/f/intdoc.texi
-       $(MAKEINFO) -I$(srcdir)/f -o f/g77.info $(srcdir)/f/g77.texi
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       if [ -f lang-f77 ]; then \
+         rm $(srcdir)/f/g77.info-*; \
+         $(MAKEINFO) -I$(srcdir)/f -o f/g77.info $(srcdir)/f/g77.texi; \
+       fi
 
 f/g77.dvi: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
-                    $(srcdir)/f/g77install.texi $(srcdir)/f/news.texi \
-                    $(srcdir)/f/intdoc.texi
-       $(TEXI2DVI) -I$(srcdir)/f -o f/g77.dvi $(srcdir)/f/g77.texi
+           $(srcdir)/f/g77install.texi $(srcdir)/f/news.texi \
+           $(srcdir)/f/intdoc.texi
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       if [ -f lang-f77 ]; then \
+         $(TEXI2DVI) -I$(srcdir)/f -o f/g77.dvi $(srcdir)/f/g77.texi; \
+       fi
 
 # This dance is all about producing accurate documentation for g77's
 # intrinsics with minimum fuss.  f/ansify appends "\n\" to C strings
@@ -276,13 +279,19 @@ f/g77.dvi: $(srcdir)/f/g77.texi $(srcdir)/f/bugs.texi \
 # been found only upon reading the documentation that was automatically
 # produced from it.
 $(srcdir)/f/intdoc.texi: f/intdoc.c f/intdoc.in f/ansify.c f/intrin.def f/intrin.h
-       $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
-             `echo $(srcdir)/f/ansify.c | sed 's,^\./,,'` -o f/ansify
-       f/ansify < $(srcdir)/f/intdoc.in > f/intdoc.h0 $(srcdir)/f/intdoc.in
-       $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -I./f \
-             `echo $(srcdir)/f/intdoc.c | sed 's,^\./,,'` -o f/intdoc
-       f/intdoc > $(srcdir)/f/intdoc.texi
-       rm f/intdoc f/ansify f/intdoc.h0
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       if [ -f lang-f77 ]; then \
+         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
+          `echo $(srcdir)/f/ansify.c | sed 's,^\./,,'` -o f/ansify; \
+         f/ansify < $(srcdir)/f/intdoc.in > f/intdoc.h0 $(srcdir)/f/intdoc.in; \
+         $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -I./f \
+          `echo $(srcdir)/f/intdoc.c | sed 's,^\./,,'` -o f/intdoc; \
+         f/intdoc > $(srcdir)/f/intdoc.texi; \
+         rm f/intdoc f/ansify f/intdoc.h0; \
+       fi
 
 $(srcdir)/f/BUGS: f/bugs0.texi f/bugs.texi
        cd $(srcdir)/f; $(MAKEINFO) -D BUGSONLY --no-header --no-split \
@@ -308,30 +317,39 @@ f77.install-normal:
 # Install the driver program as $(target)-g77
 # and also as either g77 (if native) or $(tooldir)/bin/g77.
 f77.install-common:
-       -if [ -f f771$(exeext) ] ; then \
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       -if [ -f lang-f77 -a -f f771$(exeext) ] ; then \
          if [ -f g77-cross$(exeext) ] ; then \
            rm -f $(bindir)/$(G77_CROSS_NAME)$(exeext); \
            $(INSTALL_PROGRAM) g77-cross$(exeext) $(bindir)/$(G77_CROSS_NAME)$(exeext); \
            chmod a+x $(bindir)/$(G77_CROSS_NAME)$(exeext); \
-           if $(F77_INSTALL_FLAG) ; then \
-             rm -f $(bindir)/$(F77_CROSS_NAME)$(exeext); \
-             $(LN) $(bindir)/$(G77_CROSS_NAME)$(exeext) $(bindir)/$(F77_CROSS_NAME)$(exeext); \
-           fi ; \
          else \
            rm -f $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
            $(INSTALL_PROGRAM) g77$(exeext) $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
            chmod a+x $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
-           if $(F77_INSTALL_FLAG) ; then \
-             rm -f $(bindir)/$(F77_INSTALL_NAME)$(exeext); \
-             $(LN) $(bindir)/$(G77_INSTALL_NAME)$(exeext) $(bindir)/$(F77_INSTALL_NAME)$(exeext); \
-           fi ; \
          fi ; \
        else true; fi
+       @if [ -f f77-install-ok -o -f $(srcdir)/f77-install-ok ]; then \
+         echo ''; \
+         echo 'Warning: egcs no longer installs an f77 command.'; \
+         echo '         You must do so yourself.  For more information,'; \
+         echo '         read "Distributing Binaries" in the egcs g77 docs.'; \
+         echo '         (To turn off this warning, delete the file'; \
+         echo '         f77-install-ok in the source or build directory.)'; \
+         echo ''; \
+       fi
 
 # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
 # to do the install.  The sed rule was copied from stmp-int-hdrs.
 f77.install-info: f77.info
-       if [ -f f/g77.info ] ; then \
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       if [ -f lang-f77 -a -f f/g77.info ] ; then \
          rm -f $(infodir)/g77.info*; \
          for f in f/g77.info*; do \
              realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
@@ -347,44 +365,40 @@ f77.install-info: f77.info
        else : ; fi
 
 f77.install-man: $(srcdir)/f/g77.1
-       -if [ -f f771$(exeext) ] ; then \
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       -if [ -f lang-f77 -a -f f771$(exeext) ] ; then \
          if [ -f g77-cross$(exeext) ] ; then \
            rm -f $(mandir)/$(G77_CROSS_NAME)$(manext); \
            $(INSTALL_DATA) $(srcdir)/f/g77.1 $(mandir)/$(G77_CROSS_NAME)$(manext); \
            chmod a-x $(mandir)/$(G77_CROSS_NAME)$(manext); \
-           if $(F77_INSTALL_FLAG) ; then \
-             rm -f $(mandir)/$(F77_CROSS_NAME)$(manext); \
-             $(LN) $(mandir)/$(G77_CROSS_NAME)$(manext) $(mandir)/$(F77_CROSS_NAME)$(manext); \
-           fi ;\
          else \
            rm -f $(mandir)/$(G77_INSTALL_NAME)$(manext); \
            $(INSTALL_DATA) $(srcdir)/f/g77.1 $(mandir)/$(G77_INSTALL_NAME)$(manext); \
            chmod a-x $(mandir)/$(G77_INSTALL_NAME)$(manext); \
-           if $(F77_INSTALL_FLAG) ; then \
-             rm -f $(mandir)/$(F77_INSTALL_NAME)$(manext); \
-             $(LN) $(mandir)/$(G77_INSTALL_NAME)$(manext) $(mandir)/$(F77_INSTALL_NAME)$(manext); \
-           fi ;\
          fi; \
        else true; fi
 
 f77.uninstall:
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
        @if [ -f lang-f77 ] ; then \
          if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
            echo " install-info --delete --info-dir=$(infodir) $(infodir)/g77.info"; \
            install-info --delete --info-dir=$(infodir) $(infodir)/g77.info || : ; \
          else : ; fi; \
        else : ; fi
-       -if $(F77_INSTALL_FLAG) ; then \
-         rm -rf $(bindir)/$(F77_INSTALL_NAME)$(exeext) ; \
-         rm -rf $(bindir)/$(F77_CROSS_NAME)$(exeext) ; \
-         rm -rf $(mandir)/$(F77_INSTALL_NAME)$(manext) ; \
-         rm -rf $(mandir)/$(F77_CROSS_NAME)$(manext) ; \
+       -if [ -f lang-f77 ]; then \
+         rm -rf $(bindir)/$(G77_INSTALL_NAME)$(exeext); \
+         rm -rf $(bindir)/$(G77_CROSS_NAME)$(exeext); \
+         rm -rf $(mandir)/$(G77_INSTALL_NAME)$(manext); \
+         rm -rf $(mandir)/$(G77_CROSS_NAME)$(manext); \
+         rm -rf $(infodir)/g77.info*; \
        fi
-       -rm -rf $(bindir)/$(G77_INSTALL_NAME)$(exeext)
-       -rm -rf $(bindir)/$(G77_CROSS_NAME)$(exeext)
-       -rm -rf $(mandir)/$(G77_INSTALL_NAME)$(manext)
-       -rm -rf $(mandir)/$(G77_CROSS_NAME)$(manext)
-       -rm -rf $(infodir)/g77.info*
 #\f
 # Clean hooks:
 # A lot of the ancillary files are deleted by the main makefile.
@@ -392,36 +406,52 @@ f77.uninstall:
 
 f77.mostlyclean:
        -rm -f f/*$(objext)
-       -rm -f f/fini f/f771$(exeext) f/stamp-str f/str-*.h f/str-*.j f/intdoc f/ansify f/intdoc.h0
+       -rm -f f/fini f/stamp-str f/str-*.h f/str-*.j
+       -rm -f f/intdoc f/ansify f/intdoc.h0
 f77.clean:
        -rm -f g77.c g77.o g77spec.o g77version.o
 f77.distclean:
-       -rm -f f/Makefile
-# realclean is the pre-2.7.0 name for maintainer-clean
-f77.maintainer-clean f77.realclean: f77.distclean
+       -rm -f lang-f77 f/Makefile
+f77.extraclean:
+f77.maintainer-clean:
        -rm -f f/g77.info* f/g77.*aux f/TAGS f/BUGS f/INSTALL f/NEWS f/intdoc.texi
 #\f
 # Stage hooks:
 # The main makefile has already created stage?/f.
 
-G77STAGESTUFF = f/*$(objext) f/fini f/stamp-str f/str-*.h f/str-*.j g77.o g77spec.o g77version.o
+G77STAGESTUFF = f/*$(objext) f/fini f/stamp-str f/str-*.h f/str-*.j \
+  lang-f77 g77.o g77spec.o g77version.o
 
 f77.stage1: stage1-start
-       -mv $(G77STAGESTUFF) stage1/f
+       -if [ -f lang-f77 ]; then \
+         mv $(G77STAGESTUFF) stage1/f; \
+       fi
 f77.stage2: stage2-start
-       -mv $(G77STAGESTUFF) stage2/f
+       -if [ -f lang-f77 ]; then \
+         mv $(G77STAGESTUFF) stage2/f; \
+       fi
 f77.stage3: stage3-start
-       -mv $(G77STAGESTUFF) stage3/f
+       -if [ -f lang-f77 ]; then \
+         mv $(G77STAGESTUFF) stage3/f; \
+       fi
 f77.stage4: stage4-start
-       -mv $(G77STAGESTUFF) stage4/f
+       -if [ -f lang-f77 ]; then \
+         mv $(G77STAGESTUFF) stage4/f; \
+       fi
 #\f
 # Maintenance hooks:
 
 # This target creates the files that can be rebuilt, but go in the
 # distribution anyway.  It then copies the files to the distdir directory.
 f77.distdir: f77.rebuilt
-       mkdir tmp/f
-       cd f; \
-       for file in *[0-9a-zA-Z+]; do \
-         ($LN) $$file ../tmp/f
-       done
+       case "$(LANGUAGES)" in \
+         *[fF]77*) touch lang-f77;; \
+         *) rm -f lang-f77;; \
+       esac
+       -if [ -f lang-f77 ]; then \
+         mkdir tmp/f; \
+         cd f; \
+         for file in *[0-9a-zA-Z+]; do \
+           $(LN_S) $$file ../tmp/f; \
+         done; \
+       fi
index 54c5e3f7377f1dd6a3ff900149ad61ccdc36552a..3d4868524b79375579fd18cf87424935834f15fa 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for GNU F77 compiler.
-#   Copyright (C) 1995-1997 Free Software Foundation, Inc.
+#   Copyright (C) 1995-1998 Free Software Foundation, Inc.
 
 #This file is part of GNU Fortran.
 
@@ -54,8 +54,7 @@ T_CFLAGS =
 X_CPPFLAGS =
 T_CPPFLAGS =
 
-CC = cc
-HOST_CC = $(CC)
+CC = @CC@
 BISON = bison
 BISONFLAGS =
 LEX = flex
@@ -84,15 +83,13 @@ GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
 # These are used because `configure' appends `cross-make'
 # to the makefile when making a cross-compiler.
 
-target= ... `configure' substitutes actual target name here.
-xmake_file= ... `configure' substitutes actual x- file name here.
-tmake_file= ... `configure' substitutes actual t- file name here.
+target=@target@
+xmake_file=@dep_host_xmake_file@
+tmake_file=@dep_tmake_file@
 
-# Directory where gcc sources are (gcc/), from where we are.
-# Note that this should be overridden when building f771, which happens
-# at the top level, not in f.  Likewise for VPATH (if added).
-srcdir = .
-VPATH = .
+# Directory where sources are, from where we are.
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 # Additional system libraries to link with.
 CLIB=
@@ -106,26 +103,8 @@ ALL=all
 
 # End of variables for you to override.
 
-# Definition of `none' is here so that new rules inserted by sed
+# Definition of `all' is here so that new rules inserted by sed
 # do not specify the default target.
-none:
-       @echo ''
-       @echo 'Do not use this makefile to build anything other than the'
-       @echo 'g77 derived files via the "make g77-only" target.'
-       @echo 'Instead, use the documented procedures to build gcc itself,'
-       @echo 'which will build g77 as well when done properly.'
-       @echo ''
-       @exit 1
-
-# This rule is just a handy way to build the g77 derived files without
-# having the gcc source tree around.
-g77-only: force
-       if [ -f g77.texi ] ; then \
-         (cd ..; $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt); \
-       else \
-         $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt; \
-       fi
-
 all: all.indirect
 
 # This tells GNU Make version 3 not to put all variables in the environment.
@@ -133,16 +112,21 @@ all: all.indirect
 
 # sed inserts variable overrides after the following line.
 ####target overrides
+@target_overrides@
 ####host overrides
+@host_overrides@
 ####cross overrides
+@cross_defines@
+@cross_overrides@
 ####build overrides
+@build_overrides@
 #\f
 # Now figure out from those variables how to compile and link.
 
-all.indirect: f/Makefile f771$(exeext)
+all.indirect: Makefile ../f771$(exeext)
 
 # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
-INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
+INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
 
 # This is the variable actually used when we compile.
 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W -Wall
@@ -151,17 +135,17 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) -W
 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
 
 # f771 is so big, need to tell linker on m68k-next-nextstep* to make enough
-# room for it.  On AIX, linking f771 overflows the linker TOC.  -bbigtoc is
-# appropriate for the linker on AIX 4.1 and above.
+# room for it.  On AIX, linking f771 overflows the linker TOC;
+# `-bbigtoc' is appropriate for the linker on AIX 4.1 and above.
 F771_LDFLAGS = `case "${target}" in\
  m68k-next-nextstep*) echo -segaddr __DATA 6000000;;\
  *-*-aix[4-9]*) \`$(CC) --print-prog-name=ld\` -v 2>&1 | grep BFD >/dev/null || echo -Wl,-bbigtoc;; esac`
 
 # Even if ALLOCA is set, don't use it if compiling with GCC.
 
-SUBDIR_OBSTACK = `if [ x$(OBSTACK) != x ]; then echo $(OBSTACK); else true; fi`
-SUBDIR_USE_ALLOCA = `case "${CC}" in "${OLDCC}") if [ x$(ALLOCA) != x ]; then echo $(ALLOCA); else true; fi ;; esac`
-SUBDIR_MALLOC = `if [ x$(MALLOC) != x ]; then echo $(MALLOC); else true; fi`
+SUBDIR_OBSTACK = `if [ x$(OBSTACK) != x ]; then echo ../$(OBSTACK); else true; fi`
+SUBDIR_USE_ALLOCA = `case "${CC}" in "${OLDCC}") if [ x$(ALLOCA) != x ]; then echo ../$(ALLOCA); else true; fi ;; esac`
+SUBDIR_MALLOC = `if [ x$(MALLOC) != x ]; then echo ../$(MALLOC); else true; fi`
 
 # How to link with both our special library facilities
 # and the system's installed libraries.
@@ -170,105 +154,72 @@ LIBS = $(SUBDIR_OBSTACK) $(SUBDIR_USE_ALLOCA) $(SUBDIR_MALLOC) $(CLIB)
 # Specify the directories to be searched for header files.
 # Both . and srcdir are used, in that order,
 # so that tm.h and config.h will be found in the compilation
-# directory rather than in the source directory.
-INCLUDES = -If -I$(srcdir)/f -I. -I$(srcdir) -I$(srcdir)/config
-
-# Flags_to_pass to recursive makes.
-# Note that we don't need to distinguish the `_FOR_TARGET' cross tools
-# as AR and RANLIB are set appropriately by configure iff cross compiling.
-FLAGS_TO_PASS = \
-       "CROSS=$(CROSS)" \
-       "AR_FLAGS=$(AR_FLAGS)" \
-       "AR=$(AR)" \
-       "BISON=$(BISON)" \
-       "BISONFLAGS=$(BISONFLAGS)" \
-       "CC=$(CC)" \
-       "CFLAGS=$(CFLAGS)" \
-       "GCCFLAGS=$(GCCFLAGS)" \
-       "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
-       "LDFLAGS=$(LDFLAGS)" \
-       "LEX=$(LEX)" \
-       "LEXFLAGS=$(LEXFLAGS)" \
-       "MAKEINFO=$(MAKEINFO)" \
-       "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
-       "RANLIB=$(RANLIB)" \
-       "RANLIB_TEST=$(RANLIB_TEST)" \
-       "SHELL=$(SHELL)" \
-       "exec_prefix=$(exec_prefix)" \
-       "prefix=$(prefix)" \
-       "local_prefix=$(local_prefix)" \
-       "gxx_include_dir=$(gxx_include_dir)" \
-       "tooldir=$(tooldir)" \
-       "bindir=$(bindir)" \
-       "libsubdir=$(libsubdir)"
+# subdirectory rather than in the source directory.
+INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config
 
+# Always use -I$(srcdir)/config when compiling.
 .c.o:
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< -o $@
+       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
+
 #\f
 # Lists of files for various purposes.
 
 # Language-specific object files for g77
 
 F77_OBJS = \
f/bad.o \
f/bit.o \
f/bld.o \
f/com.o \
f/data.o \
f/equiv.o \
f/expr.o \
f/global.o \
f/implic.o \
f/info.o \
f/intrin.o \
f/lab.o \
f/lex.o \
f/malloc.o \
f/name.o \
f/parse.o \
f/proj.o \
f/src.o \
f/st.o \
f/sta.o \
f/stb.o \
f/stc.o \
f/std.o \
f/ste.o \
f/storag.o \
f/stp.o \
f/str.o \
f/sts.o \
f/stt.o \
f/stu.o \
f/stv.o \
f/stw.o \
f/symbol.o \
f/target.o \
f/top.o \
f/type.o \
f/version.o \
f/where.o
+ bad.o \
+ bit.o \
+ bld.o \
+ com.o \
+ data.o \
+ equiv.o \
+ expr.o \
+ global.o \
+ implic.o \
+ info.o \
+ intrin.o \
+ lab.o \
+ lex.o \
+ malloc.o \
+ name.o \
+ parse.o \
+ proj.o \
+ src.o \
+ st.o \
+ sta.o \
+ stb.o \
+ stc.o \
+ std.o \
+ ste.o \
+ storag.o \
+ stp.o \
+ str.o \
+ sts.o \
+ stt.o \
+ stu.o \
+ stv.o \
+ stw.o \
+ symbol.o \
+ target.o \
+ top.o \
+ type.o \
+ version.o \
+ where.o
 
 # Language-independent object files.
-OBJS = `cat stamp-objlist | sed -e "s:  : :g" -e "s: : f/:g"`
-OBJDEPS = stamp-objlist
+OBJS = `cat ../stamp-objlist`
+OBJDEPS = ../stamp-objlist
 
-compiler: f771$(exeext)
-# This is now meant to be built in the top level directory, not `f':
-f771$(exeext): $(P) f/Makefile $(F77_OBJS) $(OBJDEPS) $(LIBDEPS)
+compiler: ../f771$(exeext)
+../f771$(exeext): $(P) $(F77_OBJS) $(OBJDEPS) $(LIBDEPS)
        rm -f f771$(exeext)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(F771_LDFLAGS) -o $@ \
              $(F77_OBJS) $(OBJS) $(LIBS)
 
-# Check in case anyone expects to build in this directory:
-f/Makefile:
-       @if test ! -f f/Makefile ; \
-       then echo "Build f771 only at the top level." 2>&1; exit 1; \
-       else true; fi
+Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
+       cd ..; $(SHELL) config.status
 
-Makefile: $(srcdir)/f/Makefile.in $(srcdir)/configure
-
-native: f771$(exeext)
+native: config.status ../f771$(exeext)
 #\f
 # Compiling object files from source files.
 
@@ -284,19 +235,20 @@ native: f771$(exeext)
 # that live in a distclean'd gcc source directory have "$(srcdir)/"
 # prefixes, while the others don't because they'll be created
 # only in the build directory.
-ASSERT_H = $(srcdir)/f/assert.j $(srcdir)/assert.h
-CONFIG_H = $(srcdir)/f/config.j config.h
-CONVERT_H = $(srcdir)/f/convert.j $(srcdir)/convert.h
-FLAGS_H = $(srcdir)/f/flags.j $(srcdir)/flags.h
-GLIMITS_H = $(srcdir)/f/glimits.j $(srcdir)/glimits.h
-HCONFIG_H = $(srcdir)/f/hconfig.j hconfig.h
-INPUT_H = $(srcdir)/f/input.j $(srcdir)/input.h
-RTL_H = $(srcdir)/f/rtl.j $(srcdir)/rtl.h $(srcdir)/rtl.def \
-       $(srcdir)/machmode.h $(srcdir)/machmode.def
-TCONFIG_H = $(srcdir)/f/tconfig.j tconfig.h
-TM_H = $(srcdir)/f/tm.j tm.h
-TREE_H = $(srcdir)/f/tree.j $(srcdir)/tree.h $(srcdir)/real.h \
-       $(srcdir)/tree.def $(srcdir)/machmode.h $(srcdir)/machmode.def
+ASSERT_H = $(srcdir)/assert.j $(srcdir)/../assert.h
+CONFIG_H = $(srcdir)/config.j ../config.h
+CONVERT_H = $(srcdir)/convert.j $(srcdir)/../convert.h
+FLAGS_H = $(srcdir)/flags.j $(srcdir)/../flags.h
+GLIMITS_H = $(srcdir)/glimits.j $(srcdir)/../glimits.h
+HCONFIG_H = $(srcdir)/hconfig.j ../hconfig.h
+INPUT_H = $(srcdir)/input.j $(srcdir)/../input.h
+OUTPUT_H = $(srcdir)/output.j $(srcdir)/../output.h
+RTL_H = $(srcdir)/rtl.j $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
+       $(srcdir)/../machmode.h $(srcdir)/../machmode.def
+TCONFIG_H = $(srcdir)/tconfig.j ../tconfig.h
+TM_H = $(srcdir)/tm.j ../tm.h
+TREE_H = $(srcdir)/tree.j $(srcdir)/../tree.h $(srcdir)/../real.h \
+       $(srcdir)/../tree.def $(srcdir)/../machmode.h $(srcdir)/../machmode.def
 
 #Build the first part of this list with the command line:
 #    cd gcc/; make deps-kinda -f f/Makefile.in
@@ -307,211 +259,211 @@ TREE_H = $(srcdir)/f/tree.j $(srcdir)/tree.h $(srcdir)/real.h \
 # $(RTL_H) for rtl.h.  deps-kinda uses a sed script to do those
 # substitutions, plus others for elegance.
 
-f/bad.o: f/bad.c f/proj.h $(ASSERT_H) f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
-  f/top.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h \
 f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/lex.h f/type.h \
 f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h f/storag.h \
-  f/global.h f/name.h
-f/bit.o: f/bit.c f/proj.h $(ASSERT_H) $(GLIMITS_H) f/bit.h f/malloc.h
-f/bld.o: f/bld.c f/proj.h $(ASSERT_H) f/bld.h f/bld-op.def f/bit.h f/malloc.h \
-  f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
 f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h f/type.h \
 f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
-  f/intrin.h f/intrin.def
-f/com.o: f/com.c $(CONFIG_H) $(FLAGS_H) $(RTL_H) $(TREE_H) $(CONVERT_H) f/proj.h \
-  $(ASSERT_H) f/com.h f/com-rt.def f/bld.h f/bld-op.def f/bit.h f/malloc.h \
 f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def \
 f/where.h $(GLIMITS_H) f/top.h f/lex.h f/type.h f/intrin.h f/intrin.def f/lab.h \
 f/symbol.h f/symbol.def f/equiv.h f/storag.h f/global.h f/name.h f/expr.h \
-  f/implic.h f/src.h f/st.h
-f/data.o: f/data.c f/proj.h $(ASSERT_H) f/data.h f/bld.h f/bld-op.def f/bit.h \
-  f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
-  f/name.h f/intrin.h f/intrin.def f/expr.h f/st.h
-f/equiv.o: f/equiv.c f/proj.h $(ASSERT_H) f/equiv.h f/bld.h f/bld-op.def f/bit.h \
-  f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/global.h f/name.h \
-  f/intrin.h f/intrin.def f/data.h
-f/expr.o: f/expr.c f/proj.h $(ASSERT_H) f/expr.h f/bld.h f/bld-op.def f/bit.h \
-  f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
-  f/name.h f/intrin.h f/intrin.def f/implic.h f/src.h f/st.h f/stamp-str
-f/fini.o: f/fini.c f/proj.h $(ASSERT_H) f/malloc.h
-f/g77.o: f/g77.c $(CONFIG_H)
-f/global.o: f/global.c f/proj.h $(ASSERT_H) f/global.h f/lex.h f/top.h f/malloc.h \
 f/where.h $(GLIMITS_H) f/name.h f/symbol.h f/symbol.def f/bad.h f/bad.def \
 f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
 f/info-b.def f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h f/storag.h \
 f/intrin.h f/intrin.def f/equiv.h
-f/implic.o: f/implic.c f/proj.h $(ASSERT_H) f/implic.h f/info.h f/info-b.def \
 f/info-k.def f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def f/where.h \
 $(GLIMITS_H) f/top.h f/malloc.h f/lex.h f/type.h f/symbol.h f/symbol.def f/bld.h \
 f/bld-op.def f/bit.h f/com.h f/com-rt.def f/lab.h f/storag.h f/intrin.h \
 f/intrin.def f/equiv.h f/global.h f/name.h f/src.h
-f/info.o: f/info.c f/proj.h $(ASSERT_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h $(TREE_H) f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
 f/top.h f/malloc.h f/lex.h f/type.h
-f/intrin.o: f/intrin.c f/proj.h $(ASSERT_H) f/intrin.h f/intrin.def f/bld.h \
-  f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
 f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h \
 $(GLIMITS_H) f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
-  f/equiv.h f/global.h f/name.h f/src.h
-f/lab.o: f/lab.c f/proj.h $(ASSERT_H) f/lab.h f/com.h f/com-rt.def $(TREE_H) f/bld.h \
-  f/bld-op.def f/bit.h f/malloc.h f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/intrin.h f/intrin.def f/symbol.h f/symbol.def f/equiv.h f/storag.h \
-  f/global.h f/name.h
-f/lex.o: f/lex.c f/proj.h $(ASSERT_H) f/top.h f/malloc.h f/where.h $(GLIMITS_H) \
-  f/bad.h f/bad.def f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h \
 f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/lex.h f/type.h \
 f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h f/storag.h \
-  f/global.h f/name.h f/src.h $(CONFIG_H) $(FLAGS_H) $(INPUT_H)
-f/malloc.o: f/malloc.c f/proj.h $(ASSERT_H) f/malloc.h
-f/name.o: f/name.c f/proj.h $(ASSERT_H) f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
-  f/top.h f/malloc.h f/name.h f/global.h f/lex.h f/symbol.h f/symbol.def f/bld.h \
 f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \
 f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h f/storag.h f/intrin.h \
-  f/intrin.def f/equiv.h f/src.h
-f/parse.o: f/parse.c f/proj.h $(ASSERT_H) f/top.h f/malloc.h f/where.h $(GLIMITS_H) \
-  f/com.h f/com-rt.def $(TREE_H) f/bld.h f/bld-op.def f/bit.h f/info.h \
 f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/lex.h \
 f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h \
-  f/storag.h f/global.h f/name.h f/version.h $(FLAGS_H)
-f/proj.o: f/proj.c f/proj.h $(ASSERT_H) $(GLIMITS_H)
-f/src.o: f/src.c f/proj.h $(ASSERT_H) f/src.h f/bad.h f/bad.def f/where.h \
-  $(GLIMITS_H) f/top.h f/malloc.h
-f/st.o: f/st.c f/proj.h $(ASSERT_H) f/st.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) \
-  f/top.h f/malloc.h f/lex.h f/symbol.h f/symbol.def f/bld.h f/bld-op.def f/bit.h \
 f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
 f/target.h f/type.h f/lab.h f/storag.h f/intrin.h f/intrin.def f/equiv.h \
 f/global.h f/name.h f/sta.h f/stamp-str f/stb.h f/expr.h f/stp.h f/stt.h f/stc.h \
-  f/std.h f/stv.h f/stw.h f/ste.h f/sts.h f/stu.h
-f/sta.o: f/sta.c f/proj.h $(ASSERT_H) f/sta.h f/bad.h f/bad.def f/where.h \
-  $(GLIMITS_H) f/top.h f/malloc.h f/lex.h f/stamp-str f/symbol.h f/symbol.def f/bld.h \
 f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def \
 f/info-k.def f/info-w.def f/target.h f/type.h f/lab.h f/storag.h f/intrin.h \
 f/intrin.def f/equiv.h f/global.h f/name.h f/implic.h f/stb.h f/expr.h f/stp.h \
-  f/stt.h f/stc.h f/std.h f/stv.h f/stw.h
-f/stb.o: f/stb.c f/proj.h $(ASSERT_H) f/stb.h f/bad.h f/bad.def f/where.h \
-  $(GLIMITS_H) f/top.h f/malloc.h f/expr.h f/bld.h f/bld-op.def f/bit.h f/com.h \
 f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
 f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
 f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/stp.h f/stt.h f/stamp-str \
 f/src.h f/sta.h f/stc.h
-f/stc.o: f/stc.c f/proj.h $(ASSERT_H) f/stc.h f/bad.h f/bad.def f/where.h \
 $(GLIMITS_H) f/top.h f/malloc.h f/bld.h f/bld-op.def f/bit.h f/com.h \
 f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
 f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
 f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/expr.h f/stp.h f/stt.h \
 f/stamp-str f/data.h f/implic.h f/src.h f/sta.h f/std.h f/stv.h f/stw.h
-f/std.o: f/std.c f/proj.h $(ASSERT_H) f/std.h f/bld.h f/bld-op.def f/bit.h \
 f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
 f/name.h f/intrin.h f/intrin.def f/stp.h f/stt.h f/stamp-str f/stv.h f/stw.h f/sta.h \
 f/ste.h f/sts.h
-f/ste.o: f/ste.c $(CONFIG_H) $(RTL_H) f/proj.h $(ASSERT_H) f/ste.h f/bld.h \
 f/bld-op.def f/bit.h f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
 f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/where.h \
 $(GLIMITS_H) f/top.h f/lex.h f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def \
 f/equiv.h f/global.h f/name.h f/intrin.h f/intrin.def f/stp.h f/stt.h f/stamp-str \
 f/sts.h f/stv.h f/stw.h f/sta.h
-f/storag.o: f/storag.c f/proj.h $(ASSERT_H) f/storag.h f/bld.h f/bld-op.def f/bit.h \
 f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/lab.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
 f/intrin.h f/intrin.def f/data.h
-f/stp.o: f/stp.c f/proj.h $(ASSERT_H) f/stp.h f/bld.h f/bld-op.def f/bit.h \
 f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
 f/name.h f/intrin.h f/intrin.def f/stt.h
-f/str.o: f/str.c f/proj.h $(ASSERT_H) f/src.h f/bad.h f/bad.def f/where.h \
 $(GLIMITS_H) f/top.h f/malloc.h f/stamp-str f/lex.h
-f/sts.o: f/sts.c f/proj.h $(ASSERT_H) f/sts.h f/malloc.h f/com.h f/com-rt.def \
 $(TREE_H) f/bld.h f/bld-op.def f/bit.h f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/intrin.h f/intrin.def f/lab.h f/symbol.h f/symbol.def f/equiv.h \
-  f/storag.h f/global.h f/name.h
-f/stt.o: f/stt.c f/proj.h $(ASSERT_H) f/stt.h f/top.h f/malloc.h f/where.h \
 $(GLIMITS_H) f/bld.h f/bld-op.def f/bit.h f/com.h f/com-rt.def $(TREE_H) f/info.h \
 f/info-b.def f/info-k.def f/info-w.def f/target.h f/bad.h f/bad.def f/lex.h \
 f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
 f/name.h f/intrin.h f/intrin.def f/stp.h f/expr.h f/sta.h f/stamp-str
-f/stu.o: f/stu.c f/proj.h $(ASSERT_H) f/bld.h f/bld-op.def f/bit.h f/malloc.h \
 f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
 f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h f/type.h \
 f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
 f/intrin.h f/intrin.def f/implic.h f/stu.h f/sta.h f/stamp-str
-f/stv.o: f/stv.c f/proj.h $(ASSERT_H) f/stv.h f/lab.h f/com.h f/com-rt.def $(TREE_H) \
 f/bld.h f/bld-op.def f/bit.h f/malloc.h f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/intrin.h f/intrin.def f/symbol.h f/symbol.def f/equiv.h f/storag.h \
-  f/global.h f/name.h
-f/stw.o: f/stw.c f/proj.h $(ASSERT_H) f/stw.h f/bld.h f/bld-op.def f/bit.h \
 f/malloc.h f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/target.h f/bad.h f/bad.def f/where.h $(GLIMITS_H) f/top.h f/lex.h \
 f/type.h f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h \
 f/name.h f/intrin.h f/intrin.def f/stv.h f/sta.h f/stamp-str
-f/symbol.o: f/symbol.c f/proj.h $(ASSERT_H) f/symbol.h f/symbol.def f/bad.h \
 f/bad.def f/where.h $(GLIMITS_H) f/top.h f/malloc.h f/bld.h f/bld-op.def f/bit.h \
 f/com.h f/com-rt.def $(TREE_H) f/info.h f/info-b.def f/info-k.def f/info-w.def \
 f/target.h f/lex.h f/type.h f/lab.h f/storag.h f/intrin.h f/intrin.def \
 f/equiv.h f/global.h f/name.h f/src.h f/st.h
-f/target.o: f/target.c f/proj.h $(ASSERT_H) $(GLIMITS_H) f/target.h $(TREE_H) f/bad.h \
 f/bad.def f/where.h f/top.h f/malloc.h f/info.h f/info-b.def f/info-k.def \
 f/info-w.def f/type.h f/lex.h
-f/top.o: f/top.c f/proj.h $(ASSERT_H) f/top.h f/malloc.h f/where.h $(GLIMITS_H) \
 f/bad.h f/bad.def f/bit.h f/bld.h f/bld-op.def f/com.h f/com-rt.def $(TREE_H) \
 f/info.h f/info-b.def f/info-k.def f/info-w.def f/target.h f/lex.h f/type.h \
 f/lab.h f/storag.h f/symbol.h f/symbol.def f/equiv.h f/global.h f/name.h \
 f/intrin.h f/intrin.def f/data.h f/expr.h f/implic.h f/src.h f/st.h $(FLAGS_H)
-f/type.o: f/type.c f/proj.h $(ASSERT_H) f/type.h f/malloc.h
-f/where.o: f/where.c f/proj.h $(ASSERT_H) f/where.h $(GLIMITS_H) f/top.h f/malloc.h \
-  f/lex.h
-f/version.o: f/version.c f/proj.h $(ASSERT_H) f/version.h
+ansify.o: ansify.c $(ASSERT_H)
+bad.o: bad.c proj.h $(CONFIG_H) $(ASSERT_H) bad.h bad.def where.h $(GLIMITS_H) \
top.h malloc.h $(FLAGS_H) com.h com-rt.def $(TREE_H) bld.h bld-op.def bit.h \
info.h info-b.def info-k.def info-w.def target.h lex.h type.h \
+ intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
+ global.h name.h $(RTL_H)
+bit.o: bit.c proj.h $(CONFIG_H) $(ASSERT_H) $(GLIMITS_H) bit.h malloc.h
+bld.o: bld.c proj.h $(CONFIG_H) $(ASSERT_H) bld.h bld-op.def bit.h malloc.h \
com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def \
target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h type.h lab.h \
+ storag.h symbol.h symbol.def equiv.h global.h name.h intrin.h \
+ intrin.def $(RTL_H)
+com.o: com.c proj.h $(CONFIG_H) $(ASSERT_H) $(FLAGS_H) $(RTL_H) $(TREE_H) $(OUTPUT_H) \
$(CONVERT_H) com.h com-rt.def bld.h bld-op.def bit.h malloc.h info.h \
info-b.def info-k.def info-w.def target.h bad.h bad.def where.h \
$(GLIMITS_H) top.h lex.h type.h intrin.h intrin.def lab.h symbol.h \
+ symbol.def equiv.h storag.h global.h name.h expr.h implic.h src.h \
+ st.h
+data.o: data.c proj.h $(CONFIG_H) $(ASSERT_H) data.h bld.h bld-op.def bit.h \
malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
+ type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
+ intrin.h intrin.def $(RTL_H) expr.h st.h
+equiv.o: equiv.c proj.h $(CONFIG_H) $(ASSERT_H) equiv.h bld.h bld-op.def \
bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
+ type.h lab.h storag.h symbol.h symbol.def global.h name.h intrin.h \
+ intrin.def $(RTL_H) data.h
+expr.o: expr.c proj.h $(CONFIG_H) $(ASSERT_H) expr.h bld.h bld-op.def bit.h \
malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
+ type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
+ intrin.h intrin.def $(RTL_H) implic.h src.h st.h stamp-str
+fini.o: fini.c proj.h $(CONFIG_H) $(ASSERT_H) malloc.h
+global.o: global.c proj.h $(CONFIG_H) $(ASSERT_H) global.h info.h info-b.def \
info-k.def info-w.def target.h $(TREE_H) bad.h bad.def where.h $(GLIMITS_H) \
top.h malloc.h lex.h type.h name.h symbol.h symbol.def bld.h \
bld-op.def bit.h com.h com-rt.def lab.h storag.h $(RTL_H) intrin.h \
intrin.def equiv.h
+implic.o: implic.c proj.h $(CONFIG_H) $(ASSERT_H) implic.h info.h info-b.def \
info-k.def info-w.def target.h $(TREE_H) bad.h bad.def where.h $(GLIMITS_H) \
top.h malloc.h lex.h type.h symbol.h symbol.def bld.h bld-op.def \
bit.h com.h com-rt.def lab.h storag.h $(RTL_H) intrin.h intrin.def \
equiv.h global.h name.h src.h
+info.o: info.c proj.h $(CONFIG_H) $(ASSERT_H) info.h info-b.def info-k.def \
info-w.def target.h $(TREE_H) bad.h bad.def where.h $(GLIMITS_H) top.h \
malloc.h lex.h type.h
+intdoc.o: intdoc.c $(ASSERT_H) intrin.h intrin.def intdoc.h0 intdoc.h0
+intrin.o: intrin.c proj.h $(CONFIG_H) $(ASSERT_H) intrin.h intrin.def bld.h \
bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
+ lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
+ name.h $(RTL_H) expr.h src.h
+lab.o: lab.c proj.h $(CONFIG_H) $(ASSERT_H) lab.h com.h com-rt.def $(TREE_H) \
bld.h bld-op.def bit.h malloc.h info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
+ type.h intrin.h intrin.def symbol.h symbol.def equiv.h storag.h \
+ global.h name.h $(RTL_H)
+lex.o: lex.c proj.h $(CONFIG_H) $(ASSERT_H) top.h malloc.h where.h $(GLIMITS_H) \
bad.h bad.def com.h com-rt.def $(TREE_H) bld.h bld-op.def bit.h info.h \
info-b.def info-k.def info-w.def target.h lex.h type.h intrin.h \
+ intrin.def lab.h symbol.h symbol.def equiv.h storag.h global.h name.h \
+ $(RTL_H) src.h $(FLAGS_H) $(INPUT_H) $(OUTPUT_H)
+malloc.o: malloc.c proj.h $(CONFIG_H) $(ASSERT_H) malloc.h
+name.o: name.c proj.h $(CONFIG_H) $(ASSERT_H) bad.h bad.def where.h \
$(GLIMITS_H) top.h malloc.h name.h global.h info.h info-b.def info-k.def \
info-w.def target.h $(TREE_H) lex.h type.h symbol.h symbol.def bld.h \
+ bld-op.def bit.h com.h com-rt.def lab.h storag.h $(RTL_H) intrin.h \
+ intrin.def equiv.h src.h
+parse.o: parse.c proj.h $(CONFIG_H) $(ASSERT_H) top.h malloc.h where.h \
$(GLIMITS_H) com.h com-rt.def $(TREE_H) bld.h bld-op.def bit.h info.h \
info-b.def info-k.def info-w.def target.h bad.h bad.def lex.h type.h \
+ intrin.h intrin.def lab.h symbol.h symbol.def equiv.h storag.h \
+ global.h name.h $(RTL_H) version.h $(FLAGS_H)
+proj.o: proj.c proj.h $(CONFIG_H) $(ASSERT_H) $(GLIMITS_H)
+src.o: src.c proj.h $(CONFIG_H) $(ASSERT_H) src.h bad.h bad.def where.h \
+ $(GLIMITS_H) top.h malloc.h
+st.o: st.c proj.h $(CONFIG_H) $(ASSERT_H) st.h bad.h bad.def where.h \
$(GLIMITS_H) top.h malloc.h lex.h symbol.h symbol.def bld.h bld-op.def \
bit.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def \
target.h type.h lab.h storag.h $(RTL_H) intrin.h intrin.def equiv.h \
+ global.h name.h sta.h stamp-str stb.h expr.h stp.h stt.h stc.h std.h \
+ stv.h stw.h ste.h sts.h stu.h
+sta.o: sta.c proj.h $(CONFIG_H) $(ASSERT_H) sta.h bad.h bad.def where.h \
$(GLIMITS_H) top.h malloc.h lex.h stamp-str symbol.h symbol.def bld.h \
bld-op.def bit.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h type.h lab.h storag.h $(RTL_H) intrin.h intrin.def \
+ equiv.h global.h name.h implic.h stb.h expr.h stp.h stt.h stc.h std.h \
+ stv.h stw.h
+stb.o: stb.c proj.h $(CONFIG_H) $(ASSERT_H) stb.h bad.h bad.def where.h \
$(GLIMITS_H) top.h malloc.h expr.h bld.h bld-op.def bit.h com.h \
com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def target.h \
lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
name.h intrin.h intrin.def $(RTL_H) stp.h stt.h stamp-str src.h sta.h stc.h
+stc.o: stc.c proj.h $(CONFIG_H) $(ASSERT_H) stc.h bad.h bad.def where.h \
$(GLIMITS_H) top.h malloc.h bld.h bld-op.def bit.h com.h com-rt.def \
$(TREE_H) info.h info-b.def info-k.def info-w.def target.h lex.h type.h \
lab.h storag.h symbol.h symbol.def equiv.h global.h name.h intrin.h \
intrin.def $(RTL_H) expr.h stp.h stt.h stamp-str data.h implic.h src.h sta.h \
std.h stv.h stw.h
+std.o: std.c proj.h $(CONFIG_H) $(ASSERT_H) std.h bld.h bld-op.def bit.h \
malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
intrin.h intrin.def $(RTL_H) stp.h stt.h stamp-str stv.h stw.h sta.h ste.h \
+ sts.h
+ste.o: ste.c proj.h $(CONFIG_H) $(ASSERT_H) $(RTL_H) $(TREE_H) $(OUTPUT_H) ste.h \
bld.h bld-op.def bit.h malloc.h com.h com-rt.def info.h info-b.def \
info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
lex.h type.h lab.h storag.h symbol.h symbol.def equiv.h global.h \
name.h intrin.h intrin.def stp.h stt.h stamp-str sts.h stv.h stw.h expr.h \
+ sta.h
+storag.o: storag.c proj.h $(CONFIG_H) $(ASSERT_H) storag.h bld.h bld-op.def \
bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
type.h lab.h symbol.h symbol.def equiv.h global.h name.h intrin.h \
intrin.def $(RTL_H) data.h
+stp.o: stp.c proj.h $(CONFIG_H) $(ASSERT_H) stp.h bld.h bld-op.def bit.h \
malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
intrin.h intrin.def $(RTL_H) stt.h
+str.o: str.c proj.h $(CONFIG_H) $(ASSERT_H) src.h bad.h bad.def where.h \
$(GLIMITS_H) top.h malloc.h stamp-str lex.h
+sts.o: sts.c proj.h $(CONFIG_H) $(ASSERT_H) sts.h malloc.h com.h com-rt.def \
$(TREE_H) bld.h bld-op.def bit.h info.h info-b.def info-k.def info-w.def \
target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h type.h intrin.h \
intrin.def lab.h symbol.h symbol.def equiv.h storag.h global.h name.h \
+ $(RTL_H)
+stt.o: stt.c proj.h $(CONFIG_H) $(ASSERT_H) stt.h top.h malloc.h where.h \
$(GLIMITS_H) bld.h bld-op.def bit.h com.h com-rt.def $(TREE_H) info.h \
info-b.def info-k.def info-w.def target.h bad.h bad.def lex.h type.h \
lab.h storag.h symbol.h symbol.def equiv.h global.h name.h intrin.h \
intrin.def $(RTL_H) stp.h expr.h sta.h stamp-str
+stu.o: stu.c proj.h $(CONFIG_H) $(ASSERT_H) bld.h bld-op.def bit.h malloc.h \
com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def info-w.def \
target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h type.h lab.h \
storag.h symbol.h symbol.def equiv.h global.h name.h intrin.h \
intrin.def $(RTL_H) implic.h stu.h sta.h stamp-str
+stv.o: stv.c proj.h $(CONFIG_H) $(ASSERT_H) stv.h lab.h com.h com-rt.def \
$(TREE_H) bld.h bld-op.def bit.h malloc.h info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
type.h intrin.h intrin.def symbol.h symbol.def equiv.h storag.h \
+ global.h name.h $(RTL_H)
+stw.o: stw.c proj.h $(CONFIG_H) $(ASSERT_H) stw.h bld.h bld-op.def bit.h \
malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def info-k.def \
info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h lex.h \
type.h lab.h storag.h symbol.h symbol.def equiv.h global.h name.h \
intrin.h intrin.def $(RTL_H) stv.h sta.h stamp-str
+symbol.o: symbol.c proj.h $(CONFIG_H) $(ASSERT_H) symbol.h symbol.def bld.h \
bld-op.def bit.h malloc.h com.h com-rt.def $(TREE_H) info.h info-b.def \
info-k.def info-w.def target.h bad.h bad.def where.h $(GLIMITS_H) top.h \
lex.h type.h lab.h storag.h $(RTL_H) intrin.h intrin.def equiv.h \
global.h name.h src.h st.h
+target.o: target.c proj.h $(CONFIG_H) $(ASSERT_H) $(GLIMITS_H) target.h $(TREE_H) \
bad.h bad.def where.h top.h malloc.h info.h info-b.def info-k.def \
info-w.def type.h lex.h
+top.o: top.c proj.h $(CONFIG_H) $(ASSERT_H) top.h malloc.h where.h $(GLIMITS_H) \
bad.h bad.def bit.h bld.h bld-op.def com.h com-rt.def $(TREE_H) info.h \
info-b.def info-k.def info-w.def target.h lex.h type.h lab.h storag.h \
symbol.h symbol.def equiv.h global.h name.h intrin.h intrin.def $(RTL_H) \
data.h expr.h implic.h src.h st.h $(FLAGS_H)
+type.o: type.c proj.h $(CONFIG_H) $(ASSERT_H) type.h malloc.h
+version.o: version.c
+where.o: where.c proj.h $(CONFIG_H) $(ASSERT_H) where.h $(GLIMITS_H) top.h \
+ malloc.h lex.h
 
 # The rest of this list (Fortran 77 language-specific files) is hand-generated.
 
-f/stamp-str: f/str-1t.h f/str-1t.j f/str-2t.h f/str-2t.j \
f/str-fo.h f/str-fo.j f/str-io.h f/str-io.j f/str-nq.h  f/str-nq.j \
f/str-op.h f/str-op.j f/str-ot.h f/str-ot.j
-       touch f/stamp-str
+stamp-str: str-1t.h str-1t.j str-2t.h str-2t.j \
str-fo.h str-fo.j str-io.h str-io.j str-nq.h  str-nq.j \
str-op.h str-op.j str-ot.h str-ot.j
+       touch stamp-str
 
-f/str-1t.h f/str-1t.j: f/fini f/str-1t.fin
-       ./f/fini `echo $(srcdir)/f/str-1t.fin | sed 's,^\./,,'` f/str-1t.j f/str-1t.h
+str-1t.h str-1t.j: fini str-1t.fin
+       ./fini `echo $(srcdir)/str-1t.fin | sed 's,^\./,,'` str-1t.j str-1t.h
 
-f/str-2t.h f/str-2t.j: f/fini f/str-2t.fin
-       ./f/fini `echo $(srcdir)/f/str-2t.fin | sed 's,^\./,,'` f/str-2t.j f/str-2t.h
+str-2t.h str-2t.j: fini str-2t.fin
+       ./fini `echo $(srcdir)/str-2t.fin | sed 's,^\./,,'` str-2t.j str-2t.h
 
-f/str-fo.h f/str-fo.j: f/fini f/str-fo.fin
-       ./f/fini `echo $(srcdir)/f/str-fo.fin | sed 's,^\./,,'` f/str-fo.j f/str-fo.h
+str-fo.h str-fo.j: fini str-fo.fin
+       ./fini `echo $(srcdir)/str-fo.fin | sed 's,^\./,,'` str-fo.j str-fo.h
 
-f/str-io.h f/str-io.j: f/fini f/str-io.fin
-       ./f/fini `echo $(srcdir)/f/str-io.fin | sed 's,^\./,,'` f/str-io.j f/str-io.h
+str-io.h str-io.j: fini str-io.fin
+       ./fini `echo $(srcdir)/str-io.fin | sed 's,^\./,,'` str-io.j str-io.h
 
-f/str-nq.h f/str-nq.j: f/fini f/str-nq.fin
-       ./f/fini `echo $(srcdir)/f/str-nq.fin | sed 's,^\./,,'` f/str-nq.j f/str-nq.h
+str-nq.h str-nq.j: fini str-nq.fin
+       ./fini `echo $(srcdir)/str-nq.fin | sed 's,^\./,,'` str-nq.j str-nq.h
 
-f/str-op.h f/str-op.j: f/fini f/str-op.fin
-       ./f/fini `echo $(srcdir)/f/str-op.fin | sed 's,^\./,,'` f/str-op.j f/str-op.h
+str-op.h str-op.j: fini str-op.fin
+       ./fini `echo $(srcdir)/str-op.fin | sed 's,^\./,,'` str-op.j str-op.h
 
-f/str-ot.h f/str-ot.j: f/fini f/str-ot.fin
-       ./f/fini `echo $(srcdir)/f/str-ot.fin | sed 's,^\./,,'` f/str-ot.j f/str-ot.h
+str-ot.h str-ot.j: fini str-ot.fin
+       ./fini `echo $(srcdir)/str-ot.fin | sed 's,^\./,,'` str-ot.j str-ot.h
 
-f/fini: f/fini.o f/proj-h.o
-       $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o f/fini f/fini.o f/proj-h.o
+fini: fini.o proj-h.o
+       $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fini fini.o proj-h.o
 
-f/fini.o:
+fini.o:
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
-             `echo $(srcdir)/f/fini.c | sed 's,^\./,,'` -o $@
+             `echo $(srcdir)/fini.c | sed 's,^\./,,'` -o $@
 
-f/proj-h.o: f/proj.o
+proj-h.o: proj.o
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
-             `echo $(srcdir)/f/proj.c | sed 's,^\./,,'` -o $@
+             `echo $(srcdir)/proj.c | sed 's,^\./,,'` -o $@
 
 # Other than str-*.j, the *.j files are dummy #include files
 # that normally just #include the corresponding back-end *.h
@@ -532,21 +484,31 @@ f/proj-h.o: f/proj.o
 # as will be the case with proj.h in a clean directory.
 MG=-MG
 deps-kinda:
-       $(HOST_CC) -DMAKING_DEPENDENCIES -MM $(MG) -I -If f/*.c | \
-         sed -e 's: \([.]/\)*f/assert[.]j: $$(ASSERT_H):g' \
-             -e 's: \([.]/\)*f/config[.]j: $$(CONFIG_H):g' \
-             -e 's: \([.]/\)*f/convert[.]j: $$(CONVERT_H):g' \
-             -e 's: \([.]/\)*f/flags[.]j: $$(FLAGS_H):g' \
-             -e 's: \([.]/\)*f/glimits[.]j: $$(GLIMITS_H):g' \
-             -e 's: \([.]/\)*f/hconfig[.]j: $$(HCONFIG_H):g' \
-             -e 's: \([.]/\)*f/input[.]j: $$(INPUT_H):g' \
-             -e 's: \([.]/\)*f/rtl[.]j: $$(RTL_H):g' \
-             -e 's: \([.]/\)*f/tconfig[.]j: $$(TCONFIG_H):g' \
-             -e 's: \([.]/\)*f/tm[.]j: $$(TM_H):g' \
-             -e 's: \([.]/\)*f/tree[.]j: $$(TREE_H):g' \
-             -e 's: proj[.]h: f/proj.h:g' \
-             -e 's: \([.]/\)*f/str[.]h: f/stamp-str:g' \
-             -e 's%^\(.*\)[ ]*: %f/\1: %g'
+       $(HOST_CC) -DMAKING_DEPENDENCIES -MM $(MG) *.c | \
+         sed -e 's: \([.]/\)*assert[.]j: $$(ASSERT_H):g' \
+             -e 's: \([.]/\)*config[.]j: $$(CONFIG_H):g' \
+             -e 's: \([.]/\)*convert[.]j: $$(CONVERT_H):g' \
+             -e 's: \([.]/\)*flags[.]j: $$(FLAGS_H):g' \
+             -e 's: \([.]/\)*glimits[.]j: $$(GLIMITS_H):g' \
+             -e 's: \([.]/\)*hconfig[.]j: $$(HCONFIG_H):g' \
+             -e 's: \([.]/\)*input[.]j: $$(INPUT_H):g' \
+             -e 's: \([.]/\)*output[.]j: $$(OUTPUT_H):g' \
+             -e 's: \([.]/\)*rtl[.]j: $$(RTL_H):g' \
+             -e 's: \([.]/\)*tconfig[.]j: $$(TCONFIG_H):g' \
+             -e 's: \([.]/\)*tm[.]j: $$(TM_H):g' \
+             -e 's: \([.]/\)*tree[.]j: $$(TREE_H):g' \
+             -e 's: \([.]/\)*str[.]h: stamp-str:g' \
+             -e 's:.*g77spec.*::g' \
+             -e 's%^\(.*\)[ ]*: %\1: %g'
+
+# This rule is just a handy way to build the g77 derived files without
+# having the gcc source tree around.
+g77-only: force
+       if [ -f g77.texi ] ; then \
+         (cd ..; $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt); \
+       else \
+         $(MAKE) srcdir=. HOST_CC=cc HOST_CFLAGS=-g -f f/Make-lang.in f77.rebuilt; \
+       fi
 
 #\f
 # These exist for maintenance purposes.
@@ -556,9 +518,8 @@ TAGS: force
        cd $(srcdir)/f ;                        \
        etags *.c *.h ;                         \
        echo 'l' | tr 'l' '\f' >> TAGS ;        \
-       echo 'parse.y,0' >> TAGS ;              \
        etags -a ../*.h ../*.c;
 
-.PHONY: none all all.indirect f77.rebuilt compiler native deps-kinda TAGS g77-only
+.PHONY: none all all.indirect f77.rebuilt compiler native deps-kinda g77-only TAGS force
 
 force:
index 5041e67c166eed1e342bcf1bc93b16363a8f7ff4..ec250eb7bd94e19d088e23e1765fb8ac670e3517 100644 (file)
@@ -39,6 +39,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "proj.h"
 #include <ctype.h>
 #include "bad.h"
+#include "flags.j"
 #include "com.h"
 #include "where.h"
 
index 512e9269929a23a54d33279aec79a19016c96902..2f7111fa1d4f7bbfde8e653039c617be3adc50df 100644 (file)
@@ -85,11 +85,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 /* Include files. */
 
+#include "proj.h"
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 #include "config.j"
 #include "flags.j"
 #include "rtl.j"
 #include "tree.j"
+#include "output.j"  /* Must follow tree.j so TREE_CODE is defined! */
 #include "convert.j"
 #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
 
@@ -154,9 +156,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 char *getenv ();
 #endif
 
-char *index ();
-char *rindex ();
-
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -195,7 +194,6 @@ typedef struct { unsigned :16, :16, :16; } vms_ino_t;
 
 /* END stuff from gcc/cccp.c.  */
 
-#include "proj.h"
 #define FFECOM_DETERMINE_TYPES 1 /* for com.h */
 #include "com.h"
 #include "bad.h"
index 62346d541b5b4c3cd6dc8755ffc9ec454cb3b675..61f0e8872ecd20bf68413b37bb5e850c9ac9e559 100644 (file)
@@ -338,53 +338,11 @@ tree ffecom_temp_label (void);
 tree ffecom_truth_value (tree expr);
 tree ffecom_truth_value_invert (tree expr);
 tree ffecom_which_entrypoint_decl (void);
-#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
 
-/* ~~~Eliminate these when possible, since the back end should be
-   declaring them in some .h file.  */
+/* These need to be in the front end with exactly these interfaces,
+   as they're called by the back end.  */
 
-#if FFECOM_targetCURRENT == FFECOM_targetGCC
-extern int flag_pedantic_errors;
-void emit_nop (void);
-void announce_function (tree decl);
-extern FILE *asm_out_file;
-void assemble_string (char *, int);
-void assemble_variable (tree decl, int top_level, int at_end,
-                       int dont_output_data);
-void assemble_zeros (int size);
-int count_error (int warningp);
-void error (char *s, ...);
-void expand_decl (tree decl);
-void expand_computed_goto (tree exp);
-void expand_function_end (char *filename, int line, int end_bindings);
-void expand_function_start (tree subr, int parms_have_cleanups);
-void expand_main_function (void);
-void fatal (char *s, ...);
-void init_function_start (tree subr, char *filename, int line);
-void make_function_rtl (tree decl);
-void make_decl_rtl (tree decl, char *asmspec, int top_level);
-void make_var_volatile (tree var);
 int mark_addressable (tree expr);
-void output_inline_function (tree fndecl);
-void pedwarn (char *s, ...);
-void pop_function_context (void);
-void pop_momentary_nofree (void);
-void preserve_initializer (void);
-void print_node (FILE *file, char *prefix, tree node, int indent);
-void push_function_context (void);
-void push_obstacks (struct obstack *current, struct obstack *saveable);
-void put_var_into_stack (tree decl);
-void remember_end_note (tree block);
-void report_error_function (char *file);
-void rest_of_compilation (tree decl);
-void rest_of_decl_compilation (tree decl, char *asmspec, int top_level,
-                              int at_end);
-void resume_temporary_allocation (void);
-void set_identifier_size (int size);
-void temporary_allocation (void);
-tree truthvalue_conversion (tree expr);
-void warning_with_decl (tree decl, char *s, ...);
-void warning (char *s, ...);
 #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
 
 /* Define macros. */
index d28619fd7e395e8314a21d2c6245971b26de7b74..504bc2031693ebd65738dc69de2dc9bb69fa3a02 100644 (file)
 # stagestuff   - files to add to $(STAGESTUFF)
 # diff_excludes        - files to ignore when building diffs between two versions.
 
-#if grep DECL_STATIC_CONSTRUCTOR $srcdir/tree.h >/dev/null; then
-#   if grep flag_move_all_movables $srcdir/toplev.c >/dev/null; then true
-#   else
-#      echo "You haven't applied the patches to the GCC 2.7.x distribution in"
-#      echo "$srcdir as described in g77/README.g77 and gcc/f/gbe/README."
-#      echo ""
-#      exit 1
-#   fi
-#else
-#   if grep put_pending_sizes $srcdir/stor-layout.c >/dev/null; then true
-#   else
-#      echo "You haven't applied the patches to the GCC 2.6.x distribution in"
-#      echo "$srcdir as described in g77/README.g77 and gcc/f/gbe/README."
-#      echo ""
-#      exit 1
-#   fi
-#fi
-
 language="f77"
 
 compilers="f771\$(exeext)"
 
 stagestuff="g77\$(exeext) g77-cross\$(exeext) f771\$(exeext)"
 
-diff_excludes="-x \"f/g77.info*\""
-
-test -d f || mkdir f
-for stageN in stage1 stage2 stage3 stage4
-do
-       test -d $stageN || mkdir $stageN
-       test -d $stageN/f || mkdir $stageN/f
-done
+diff_excludes="-x f/BUGS -x f/NEWS -x f/INSTALL -x f/intdoc.texi"
 
-# Make links into top-level stageN from target trees.
-for stageN in stage1 stage2 stage3 stage4 include
-do
-       $remove -f f/$stageN 
-       (cd f; $symbolic_link ../$stageN . 2>/dev/null)
-done
+outputs=f/Makefile
index 479e3006ea6bcb8b19290eda89f3b1d9f12fddb7..3a8504dd6108213a23bc5dcab06e263ff054621b 100644 (file)
@@ -1,20 +1,20 @@
 .\" Copyright (c) 1995-1997 Free Software Foundation              -*-Text-*-
 .\" See section COPYING for conditions for redistribution
 .\" FIXME: no info here on predefines.  Should there be?  extra for F77...
-.TH G77 1 "1998-03-08" "GNU Tools" "GNU Tools"
+.TH G77 1 "1998-04-17" "GNU Tools" "GNU Tools"
 .de BP
 .sp
 .ti \-.2i
 \(**
 ..
 .SH NAME
-g77 \- GNU project Fortran Compiler (v0.5.22)
+g77 \- GNU project Fortran Compiler (v0.5.23)
 .SH SYNOPSIS
 .RB g77 " [" \c
 .IR option " | " "filename " ].\|.\|.
 .SH WARNING
 The information in this man page is an extract from the full
-documentation of the GNU Fortran compiler (version 0.5.22),
+documentation of the GNU Fortran compiler (version 0.5.23),
 and is limited to the meaning of some of the options.
 .PP
 This man page is not up to date, since no volunteers want to
@@ -22,8 +22,8 @@ maintain it.  If you find a discrepancy between the man page and the
 software, please check the Info file, which is the authoritative
 documentation.
 .\" .PP
-.\" The version of GNU Fortran documented by the Info file is 0.5.22,
-.\" which includes substantial improvements and changes since 0.5.22,
+.\" The version of GNU Fortran documented by the Info file is 0.5.23,
+.\" which includes substantial improvements and changes since 0.5.23,
 .\" the version documented in this man page.
 .PP
 If we find that the things in this man page that are out of date cause
@@ -37,7 +37,7 @@ For complete and current documentation, refer to the Info file `\|\c
 .B g77\c
 \&\|' or the manual
 .I
-Using and Porting GNU Fortran (for version 0.5.22)\c
+Using and Porting GNU Fortran (for version 0.5.23)\c
 \&.  Both are made from the Texinfo source file
 .BR g77.texi .
 .PP
@@ -152,19 +152,6 @@ Define macro \c
 .I defn\c
 \&.
 .TP
-.BI \-\-driver= command
-Specifies that 
-.IR command ,
-rather than 
-.RB ` gcc ',
-is to be invoked by 
-.RB ` g77 '
-to do its job.  Example: Within the gcc build directory after building
-GNU Fortran (but without having to install it),
-.nf
-  ./g77 \-\-driver=./xgcc -B./ foo.f
-.fi
-.TP
 .B \-E
 Stop after the preprocessing stage; do not run the compiler proper.  The
 output is preprocessed source code, which is sent to the
@@ -247,16 +234,7 @@ Print (on standard error output) the commands executed to run the
 stages of compilation.  Also print the version number of the compiler
 driver program and of the preprocessor and the compiler proper.  The
 version numbers of g77 itself and the GCC distribution on which it is
-based are distinct.  Use 
-.RB ` \-\-driver=true '
-to disable actual invocation of 
-.RB ` gcc '
-(since
-.RB ` true '
-is the name of a UNIX command that simply returns success status).
-The command
-.RB ` "g77 -v" '
-is the appropriate one to determine the g77 and GCC version numbers.
+based are distinct.
 .TP
 .B \-Wall
 Issue warnings for conditions which pertain to usage that we recommend
@@ -333,7 +311,7 @@ entries in
 \&.
 .br
 .I
-Using and Porting GNU Fortran (for version 0.5.22)\c
+Using and Porting GNU Fortran (for version 0.5.23)\c
 , James Craig Burley;
 .I
 Using and Porting GNU CC (for version 2.0)\c
@@ -357,7 +335,7 @@ For instructions on how to report bugs, type `\|\c
 \&\|'.
 
 .SH COPYING
-Copyright (c) 1991-1997 Free Software Foundation, Inc.
+Copyright (c) 1991-1998 Free Software Foundation, Inc.
 .PP
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
index 3d36685aa07e9c741539cadb76f3dd420cc786f8..31756dbe7c3bca377615ac2949cb94a0359d8adf 100644 (file)
@@ -14,7 +14,7 @@
 @c %**start of header 
 @setfilename g77.info
 
-@set last-up-date 1998-05-22
+@set last-up-date 1998-05-29
 @set version-g77 0.5.23
 
 @c @setfilename useg77.info
@@ -1044,16 +1044,25 @@ used to build the operating system kernel.)
 The @code{g77} command itself, which also might be installed as the
 system's @code{f77} command.
 
+@cindex libg2c library
 @cindex libf2c library
 @cindex libraries, libf2c
+@cindex libraries, libg2c
 @cindex run-time library
 @item
-The @code{libf2c} run-time library.
+The @code{libg2c} run-time library.
 This library contains the machine code needed to support
 capabilities of the Fortran language that are not directly
 provided by the machine code generated by the @code{g77}
 compilation phase.
 
+@code{libg2c} is just the unique name @code{g77} gives
+to its version of @code{libf2c} to distinguish it from
+any copy of @code{libf2c} installed from @code{f2c}
+(or versions of @code{g77} that built @code{libf2c} under
+that same name)
+on the system.
+
 The maintainer of @code{libf2c} currently is
 @email{dmg@@bell-labs.com}.
 
@@ -1126,7 +1135,7 @@ the @code{gcc} command.
 Fortran users will normally use @code{g77} instead of @code{gcc},
 because @code{g77}
 knows how to specify the libraries needed to link with Fortran programs
-(@code{libf2c} and @code{lm}).
+(@code{libg2c} and @code{lm}).
 @code{g77} can still compile and link programs and
 source files written in other languages, just like @code{gcc}.
 
@@ -1139,7 +1148,7 @@ produces much more output than @samp{gcc -v} currently does.
 (If it produces an error message near the end of the output---diagnostics
 from the linker, usually @code{ld}---you might
 have an out-of-date @code{libf2c} that improperly handles
-complex arithmetic.)
+complex arithmetic.)
 In the output of this command, the line beginning @samp{GNU Fortran Front
 End} identifies the version number of GNU Fortran; immediately
 preceding that line is a line identifying the version of @code{gcc}
@@ -1162,14 +1171,15 @@ functions this way.
 Instead, operations like trigonometric
 functions are compiled by the @code{f771} compiler
 (invoked by @code{g77} when compiling Fortran code) into machine
-code that, when run, calls on functions in @code{libf2c}, so
-@code{libf2c} must be linked with almost every useful program
+code that, when run, calls on functions in @code{libg2c}, so
+@code{libg2c} must be linked with almost every useful program
 having any component compiled by GNU Fortran.
 (As mentioned above, the @code{g77} command takes
 care of all this for you.)
 
 The @code{f771} program represents most of what is unique to GNU Fortran.
-While much of the @code{libf2c} component is really part of @code{f2c},
+While much of the @code{libg2c} component comes from
+the @code{libf2c} component of @code{f2c},
 a free Fortran-to-C converter distributed by Bellcore (AT&T),
 plus @code{libU77}, provided by Dave Love,
 and the @code{g77} command is just a small front-end to @code{gcc},
@@ -1251,15 +1261,9 @@ appropriately before submitting it to the @code{gcc} command.
 @cindex -v option
 @cindex g77 options, -v
 @cindex options, -v
-@cindex -@w{}-driver option
-@cindex g77 options, -@w{}-driver
-@cindex options, -@w{}-driver
 Use the @samp{-v} option with @code{g77}
 to see what is going on---the first line of output is the invocation
 of the @code{gcc} command.
-Use @samp{--driver=true} to disable actual invocation
-of @code{gcc} (this works because @samp{true} is the name of a
-UNIX command that simply returns success status).
 
 @node Invoking G77
 @chapter GNU Fortran Command Options
@@ -1274,25 +1278,16 @@ for information
 on the non-Fortran-specific aspects of the @code{gcc} command (and,
 therefore, the @code{g77} command).
 
-The @code{g77} command supports one option not supported by
-the @code{gcc} command:
-
-@table @code
-@cindex -@w{}-driver option
-@cindex g77 options, -@w{}-driver
-@cindex options, -@w{}-driver
-@item --driver=@var{command}
-Specifies that @var{command}, rather than @code{gcc}, is to
-be invoked by @code{g77} to do its job.
-For example, within the @code{gcc} build directory after
-building GNU Fortran (but without having to install it),
-@kbd{./g77 --driver=./xgcc foo.f -B./}.
-@end table
-
 @cindex options, negative forms
 @cindex negative forms of options
-All other options are supported both by @code{g77} and by @code{gcc} as
-modified (and reinstalled) by the @code{g77} distribution.
+All @code{gcc} and @code{g77} options
+are accepted both by @code{g77} and by @code{gcc}
+(as well as any other drivers built at the same time,
+such as @code{g++}),
+since adding @code{g77} to the @code{gcc} distribution
+enables acceptance of @code{g77}-specific options
+by all of the relevant drivers.
+
 In some cases, options have positive and negative forms;
 the negative form of @samp{-ffoo} would be @samp{-fno-foo}.
 This manual documents only one of these two forms, whichever
@@ -1329,7 +1324,7 @@ by type.  Explanations are in the following sections.
 @item Overall Options
 @xref{Overall Options,,Options Controlling the Kind of Output}.
 @smallexample
---driver  -fversion  -fset-g77-defaults  -fno-silent
+-fversion  -fset-g77-defaults  -fno-silent
 @end smallexample
 
 @item Shorthand Options
@@ -1555,12 +1550,6 @@ The following options that affect overall processing are recognized
 by the @code{g77} and @code{gcc} commands in a GNU Fortran installation:
 
 @table @code
-@item --driver=@var{command}
-This works when invoking only the @code{g77} command, not
-when invoking the @code{gcc} command.
-@xref{Invoking G77,,GNU Fortran Command Options}, for
-information on this option.
-
 @cindex -fversion option
 @cindex options, -fversion
 @cindex printing version information
@@ -1912,7 +1901,7 @@ ANSI FORTRAN 77 and more recent versions of the Fortran standard
 specify that the body of an imperative @code{DO} loop is not executed
 if the number of iterations calculated from the parameters of the
 loop is less than 1.
-(For example, @samp{DO 10 I = 1, 0}.)
+(For example, @samp{DO 10 I = 1, 0}.)
 Such a loop is called a @dfn{zero-trip loop}.
 
 Prior to ANSI FORTRAN 77, many compilers implemented @code{DO} loops
@@ -2599,6 +2588,9 @@ gcc,Using and Porting GNU CC}, for more information on debugging options.
 Most Fortran users will want to use no optimization when
 developing and testing programs, and use @samp{-O} or @samp{-O2} when
 compiling programs for late-cycle testing and for production use.
+However, note that certain diagnostics---such as for uninitialized
+variables---depend on the flow analysis done by @samp{-O}, i.e.@: you
+must use @samp{-O} or @samp{-O2} to get such diagnostics.
 
 The following flags have particular applicability when
 compiling Fortran programs:
@@ -2607,7 +2599,7 @@ compiling Fortran programs:
 @cindex -malign-double option
 @cindex options, -malign-double
 @item -malign-double
-(Intel 386 architecture only.)
+(Intel x86 architecture only.)
 
 Noticeably improves performance of @code{g77} programs making
 heavy use of @code{REAL(KIND=2)} (@code{DOUBLE PRECISION}) data
@@ -2627,9 +2619,11 @@ and data sets.
 this option does not apply, generally speaking, to Fortran
 code compiled by @code{g77}.
 
-@emph{Also note:} @code{g77} fixes a @code{gcc} backend bug to allow
-@samp{-malign-double} to work generally, not just with
+@emph{Also note:} @samp{-malign-double} applies only to
 statically-allocated data.
+Double-precision data on the stack can still
+cause problems due to misalignment.
+@xref{Aligned Data}.
 
 @emph{Also also note:} The negative form of @samp{-malign-double}
 is @samp{-mno-align-double}, not @samp{-benign-double}.
@@ -2657,6 +2651,7 @@ Might improve optimization of loops.
 @item -fno-inline
 @cindex in-line compilation
 @cindex compilation, in-line
+@c DL: Only relevant for -O3?
 Don't compile statement functions inline.
 Might reduce the size of a program unit---which might be at
 expense of some speed (though it should compile faster).
@@ -2675,6 +2670,7 @@ on IEEE behavior for floating-point to run faster, or die trying.
 @item -fstrength-reduce
 @cindex loops, speeding up
 @cindex speeding up loops
+@c DL: normally defaulted?
 Might make some loops run faster.
 
 @cindex -frerun-cse-after-loop option
@@ -2682,6 +2678,7 @@ Might make some loops run faster.
 @item -frerun-cse-after-loop
 @cindex -fexpensive-optimizations option
 @cindex options, -fexpensive-optimizations
+@c DL: This is -O2?
 @item -fexpensive-optimizations
 @cindex -fdelayed-branch option
 @cindex options, -fdelayed-branch
@@ -2707,7 +2704,8 @@ Definitely improves performance on some code.
 @cindex -funroll-all-loops option
 @cindex options, -funroll-all-loops
 @item -funroll-all-loops
-Definitely improves performance on some code.
+@c DL: Is this really true?  What _are_ the semantics of this option?
+Improves performance on some code.
 
 @item -fno-move-all-movables
 @cindex -fno-move-all-movables option
@@ -2885,9 +2883,9 @@ return the GNU C type @code{complex} (or its @code{struct}
 equivalent).
 
 This does not affect the generation of code that interfaces with the
-@code{libf2c} library.
+@code{libg2c} library.
 
-However, because the @code{libf2c} library uses @code{f2c}
+However, because the @code{libg2c} library uses @code{f2c}
 calling conventions, @code{g77} rejects attempts to pass
 intrinsics implemented by routines in this library as actual
 arguments when @samp{-fno-f2c} is used, to avoid bugs when
@@ -2912,7 +2910,8 @@ source file used in a program, it must be used when compiling
 @cindex -ff2c-library option
 @cindex options, -ff2c-library
 @item -ff2c-library
-Specify that use of @code{libf2c} is required.
+Specify that use of @code{libg2c} (or the original @code{libf2c})
+is required.
 This is the default for the current version of @code{g77}.
 
 Currently it is not
@@ -3238,7 +3237,7 @@ Some of these do @emph{not} work when compiling programs written in Fortran:
 @cindex options, -freg-struct-return
 @item -freg-struct-return
 You should not use these except strictly the same way as you
-used them to build the version of @code{libf2c} with which
+used them to build the version of @code{libg2c} with which
 you will be linking all code compiled by @code{g77} with the
 same option.
 
@@ -3257,7 +3256,7 @@ or there will be Trouble.
 @cindex -fpack-struct option
 @cindex options, -fpack-struct
 @item -fpack-struct
-This probably will break any calls to the @code{libf2c} library,
+This probably will break any calls to the @code{libg2c} library,
 at the very least, even if it is built with the same option.
 @end table
 
@@ -3293,7 +3292,7 @@ users use @code{g77}.
 such changes to @code{g77}.
 
 To find out about existing bugs and ongoing plans for GNU
-Fortran, retrieve @url{ftp://alpha.gnu.org/g77.plan}
+Fortran, retrieve @uref{ftp://alpha.gnu.org/g77.plan}
 or, if you cannot do that, email
 @email{fortran@@gnu.org} asking for a recent copy of the
 GNU Fortran @file{.plan} file.
@@ -3326,7 +3325,7 @@ and the corresponding alias-analysis code.
 
 (Version 1.0.1 of @code{egcs} has the alias-analysis
 code, but not the @code{__restrict__} keyword.
-@code{g77} users benefit from the alias-analysis
+@code{egcs} @code{g77} users benefit from the alias-analysis
 code despite the lack of the @code{__restrict__} keyword,
 which is a C-language construct.)
 
@@ -3344,6 +3343,11 @@ because the defaults are optimized for @code{g77} users.)
 @item
 Support for the @samp{-W} option warning about
 integer division by zero.
+
+@item
+The Intel x86-specific option @samp{-malign-double}
+applying to stack-allocated data
+as well as statically-allocate data.
 @end itemize
 
 @item
@@ -3363,6 +3367,27 @@ The @code{g77} command now expects the run-time library
 to be named @code{libg2c.a} instead of @code{libf2c.a},
 to ensure that a version other than the one built and
 installed as part of the same @code{g77} version is picked up.
+
+@item
+@code{g77}'s version of @code{libf2c} separates out
+the setting of global state
+(such as command-line arguments and signal handling)
+from @file{main.o} into distinct, new library
+archive members.
+
+This should make it easier to write portable applications
+that have their own (non-Fortran) @code{main()} routine
+properly set up the @code{libf2c} environment, even
+when @code{libf2c} (now @code{libg2c}) is a shared library.
+
+@item
+Some diagnostics have been changed from warnings to errors,
+to prevent inadvertent use of the resulting, probably buggy,
+programs.
+These mostly include diagnostics about use of unsupported features
+in the @code{OPEN}, @code{INQUIRE}, @code{READ}, and
+@code{WRITE} statements,
+and about truncations of various sorts of constants.
 @end itemize
 
 @heading In 0.5.22:
@@ -3579,7 +3604,7 @@ This type is wide enough
 (holds the same number of bits)
 as the character-pointer type on the machine.
 
-On most systems, this won't make a noticable difference,
+On most systems, this won't make a noticeable difference,
 whereas on Alphas and other systems with 64-bit pointers,
 the @code{INTEGER(KIND=0)} type is equivalent to @code{INTEGER(KIND=2)}
 (often referred to as @code{INTEGER*8})
@@ -3856,8 +3881,10 @@ way through the compilation process instead of being lost.
 GNU Fortran supports a variety of extensions to, and dialects
 of, the Fortran language.
 Its primary base is the ANSI FORTRAN 77 standard, currently available on
-the network at @url{http://kumo.swcp.com/fortran/F77_std/f77_std.html}
-or in @url{ftp://ftp.ast.cam.ac.uk/pub/michael/}.
+the network at
+@uref{http://www.fortran.com/fortran/F77_std/rjcnf0001.html}
+or as monolithic text at
+@uref{http://www.fortran.com/fortran/F77_std/f77_std.html}.
 It offers some extensions that are popular among users
 of UNIX @code{f77} and @code{f2c} compilers, some that
 are popular among users of other compilers (such as Digital
@@ -3868,7 +3895,7 @@ by GNU Fortran.
 @cindex textbooks
 (If you need a text on Fortran,
 a few freely available electronic references have pointers from
-@code{http://www.fortran.com/fortran/Books/}.)
+@uref{http://www.fortran.com/fortran/Books/}.)
 
 Part of what defines a particular implementation of a Fortran
 system, such as @code{g77}, is the particular characteristics
@@ -5780,7 +5807,7 @@ While that is a likely implementation choice, other
 implementation choices are available that preserve the
 pass-by-reference semantics without passing a pointer to
 the argument, @var{arg}.
-(For example, a copy-in/copy-out implementation.)
+(For example, a copy-in/copy-out implementation.)
 And, future versions of @code{g77} might change the
 way descriptors are implemented, such as passing a
 single argument pointing to a record containing the
@@ -6566,7 +6593,7 @@ consistent with these source switches---in the sense that input will be
 expected to meet the same requirements as source code in terms
 of matching symbol names and keywords (for the exponent letters).
 
-Currently, however, @code{NAMELIST} is supported by @code{libf2c},
+Currently, however, @code{NAMELIST} is supported by @code{libg2c},
 which uppercases @code{NAMELIST} input and symbol names for matching.
 This means not only that @code{NAMELIST} output currently shows symbol
 (and keyword) names in uppercase even if lower-case source
@@ -7519,7 +7546,7 @@ architectures.
 These rules are based on the configuration that is in force for the
 version of @code{gcc} built in the same release as @code{g77} (and
 which was therefore used to build both the @code{g77} compiler
-components and the @code{libf2c} run-time library):
+components and the @code{libg2c} run-time library):
 
 @table @code
 @cindex REAL(KIND=1) type
@@ -7592,7 +7619,7 @@ Two @code{REAL(KIND=2)} scalars.
 
 @cindex *@var{n} notation
 @item @var{numeric-type}*@var{n}
-(Where @var{numeric-type} is any type other than @code{CHARACTER}.)
+(Where @var{numeric-type} is any type other than @code{CHARACTER}.)
 Same as whatever @code{gcc} type occupies @var{n} times the storage
 space of a @code{gcc} @code{char} item.
 
@@ -7862,11 +7889,15 @@ argument will become two arguments on the C side: a @code{char *}
 and an @code{int} length.
 
 Much of this compatibility results from the fact that
-@code{g77} uses the same run-time library, @code{libf2c}, used by
-@code{f2c}.
+@code{g77} uses the same run-time library,
+@code{libf2c}, used by @code{f2c},
+though @code{g77} gives its version the name @code{libg2c}
+so as to avoid conflicts when linking,
+installing them in the same directories,
+and so on.
 
 Other compilers might or might not generate code that
-is object-compatible with @code{libf2c} and current @code{g77},
+is object-compatible with @code{libg2c} and current @code{g77},
 and some might offer such compatibility only when explicitly
 selected via a command-line option to the compiler.
 
@@ -7937,13 +7968,18 @@ This should cause future versions of @code{g77} either to produce
 compatible code (at the expense of the availability of some features and
 performance), or at the very least, to produce diagnostics.
 
+(The library @code{g77} produces will no longer be named @file{libg2c}
+when it is no longer generally compatible with @file{libf2c}.
+It will likely be referred to, and, if installed as a distinct
+library, named @code{libg77}, or some other as-yet-unused name.)
+
 @node Compilers Other Than f2c
 @section Compilers Other Than @code{f2c}
 
 On systems with Fortran compilers other than @code{f2c} and @code{g77},
 code compiled by @code{g77} is not expected to work
 well with code compiled by the native compiler.
-(This is true for @code{f2c}-compiled objects as well.)
+(This is true for @code{f2c}-compiled objects as well.)
 Libraries compiled with the native compiler probably will have
 to be recompiled with @code{g77} to be used with @code{g77}-compiled code.
 
@@ -8000,7 +8036,7 @@ of work!}
 @cindex C++, linking with
 @cindex linking with C
 The following discussion assumes that you are running @code{g77} in @code{f2c}
-compatibility mode, i.e.@ not using @samp{-fno-f2c}.
+compatibility mode, i.e.@: not using @samp{-fno-f2c}.
 It provides some
 advice about quick and simple techniques for linking Fortran and C (or
 C++), the most common requirement.
@@ -8032,7 +8068,7 @@ options @code{g77} passes by running @samp{g77 -v}.
 @cindex cfortran.h
 @cindex Netlib
 Even if you don't actually use it as a compiler, @samp{f2c} from
-@url{ftp://ftp.netlib.org/f2c/src}, can be a useful tool when you're
+@uref{ftp://ftp.netlib.org/f2c/src}, can be a useful tool when you're
 interfacing (linking) Fortran and C@.
 @xref{f2c Skeletons and Prototypes,,Generating Skeletons and Prototypes with @code{f2c}}.
 
@@ -8042,7 +8078,7 @@ build the @file{src} directory from the distribution, consult the
 @code{f2c} program on your path.
 
 Something else that might be useful is @samp{cfortran.h} from
-@url{ftp://zebra/desy.de/cfortran}.
+@uref{ftp://zebra/desy.de/cfortran}.
 This is a fairly general tool which
 can be used to generate interfaces for calling in both directions
 between Fortran and C@.
@@ -8055,12 +8091,12 @@ It can be used in @code{f2c} mode with
 @cindex types, Fortran/C
 Generally, C code written to link with
 @code{g77} code---calling and/or being
-called from Fortran---should @samp{#include <f2c.h>} to define the C
+called from Fortran---should @samp{#include <g2c.h>} to define the C
 versions of the Fortran types.
 Don't assume Fortran @code{INTEGER} types
 correspond to C @samp{int}s, for instance; instead, declare them as
-@code{integer}, a type defined by @file{f2c.h}.
-@file{f2c.h} is installed where @code{gcc} will find it by
+@code{integer}, a type defined by @file{g2c.h}.
+@file{g2c.h} is installed where @code{gcc} will find it by
 default, assuming you use a copy of @code{gcc} compatible with
 @code{g77}, probably built at the same time as @code{g77}.
 
@@ -8069,7 +8105,7 @@ default, assuming you use a copy of @code{gcc} compatible with
 
 @pindex f2c
 @cindex -fno-second-underscore
-A simple and foolproof way to write @code{g77}-callable C routines---e.g.@ to
+A simple and foolproof way to write @code{g77}-callable C routines---e.g.@: to
 interface with an existing library---is to write a file (named, for
 example, @file{fred.f}) of dummy Fortran
 skeletons comprising just the declaration of the routine(s) and dummy
@@ -8078,16 +8114,17 @@ Then run @code{f2c} on file @file{fred.f} to produce @file{fred.c}
 into which you can edit
 useful code, confident the calling sequence is correct, at least.
 (There are some errors otherwise commonly made in generating C
-interfaces with f2c conventions, such as not using @code{doublereal} as
-the return type of a @code{REAL} @code{FUNCTION}.)
+interfaces with @code{f2c} conventions,
+such as not using @code{doublereal}
+as the return type of a @code{REAL} @code{FUNCTION}.)
 
 @pindex ftnchek
 @code{f2c} also can help with calling Fortran from C, using its
 @samp{-P} option to generate C prototypes appropriate for calling the
 Fortran.@footnote{The files generated like this can also be used for
 inter-unit consistency checking of dummy and actual arguments, although
-the @samp{ftnchek} tool from @url{ftp://ftp.netlib.org/fortran}
-or @url{ftp://ftp.dsm.fordham.edu} is
+the @samp{ftnchek} tool from @uref{ftp://ftp.netlib.org/fortran}
+or @uref{ftp://ftp.dsm.fordham.edu} is
 probably better for this purpose.}
 If the Fortran code containing any
 routines to be called from C is in file @file{joe.f}, use the command
@@ -8333,23 +8370,23 @@ described in this section.
 
 When @code{g77} compiles a main program unit, it gives it the public
 procedure name @samp{MAIN__}.
-The @code{libf2c} library has the actual @code{main()} procedure
+The @code{libg2c} library has the actual @code{main()} procedure
 as is typical of C-based environments, and
 it is this procedure that performs some initial start-up
 activity and then calls @samp{MAIN__}.
 
-Generally, @code{g77} and @code{libf2c} are designed so that you need not
+Generally, @code{g77} and @code{libg2c} are designed so that you need not
 include a main program unit written in Fortran in your program---it
 can be written in C or some other language.
 Especially for I/O handling, this is the case, although @code{g77} version 0.5.16
-includes a bug fix for @code{libf2c} that solved a problem with using the
+includes a bug fix for @code{libg2c} that solved a problem with using the
 @code{OPEN} statement as the first Fortran I/O activity in a program
 without a Fortran main program unit.
 
 However, if you don't intend to use @code{g77} (or @code{f2c}) to compile
 your main program unit---that is, if you intend to compile a @code{main()}
 procedure using some other language---you should carefully
-examine the code for @code{main()} in @code{libf2c}, found in the source
+examine the code for @code{main()} in @code{libg2c}, found in the source
 file @file{gcc/f/runtime/libF77/main.c}, to see what kinds of things
 might need to be done by your @code{main()} in order to provide the
 Fortran environment your Fortran code is expecting.
@@ -8358,9 +8395,9 @@ Fortran environment your Fortran code is expecting.
 @cindex intrinsics, IARGC()
 @cindex GETARG() intrinsic
 @cindex intrinsics, GETARG()
-For example, @code{libf2c}'s @code{main()} sets up the information used by
+For example, @code{libg2c}'s @code{main()} sets up the information used by
 the @code{IARGC} and @code{GETARG} intrinsics.
-Bypassing @code{libf2c}'s @code{main()}
+Bypassing @code{libg2c}'s @code{main()}
 without providing a substitute for this activity would mean
 that invoking @code{IARGC} and @code{GETARG} would produce undefined
 results.
@@ -8372,7 +8409,7 @@ results.
 @cindex .gdbinit
 When debugging, one implication of the fact that @code{main()}, which
 is the place where the debugged program ``starts'' from the
-debugger's point of view, is in @code{libf2c} is that you won't be
+debugger's point of view, is in @code{libg2c} is that you won't be
 starting your Fortran program at a point you recognize as your
 Fortran code.
 
@@ -8425,7 +8462,7 @@ The second argument is appended to the end of the user-specified
 calling sequence and is named @samp{__g77_length_@var{x}}, where @var{x}
 is the user-specified name.
 This argument is of the C type @code{ftnlen}
-(see @file{gcc/f/runtime/f2c.h.in} for information on that type) and
+(see @file{egcs/libf2c/g2c.h.in} for information on that type) and
 is the number of characters the caller has allocated in the
 array pointed to by the first argument.
 
@@ -8537,7 +8574,8 @@ as how casing is handled.
 
 External names---names of entities that are public, or ``accessible'',
 to all modules in a program---normally have an underscore (@samp{_})
-appended by @code{g77}, to generate code that is compatible with f2c.
+appended by @code{g77},
+to generate code that is compatible with @code{f2c}.
 External names include names of Fortran things like common blocks,
 external procedures (subroutines and functions, but not including
 statement functions, which are internal procedures), and entry point
@@ -8557,7 +8595,7 @@ When @samp{-funderscoring} is in force, any name (external or local)
 that already has at least one underscore in it is
 implemented by @code{g77} by appending two underscores.
 (This second underscore can be disabled via the
-@samp{-fno-second-underscore} option.)
+@samp{-fno-second-underscore} option.)
 External names are changed this way for @code{f2c} compatibility.
 Local names are changed this way to avoid collisions with external names
 that are different in the source code---@code{f2c} does the same thing, but
@@ -8630,8 +8668,9 @@ could be used to inhibit the appending of the underscore to the name.
 @cindex COMMON statement
 @cindex statements, COMMON
 
-@code{g77} names and lays out @code{COMMON} areas the same way f2c does,
-for compatibility with f2c.
+@code{g77} names and lays out @code{COMMON} areas
+the same way @code{f2c} does,
+for compatibility with @code{f2c}.
 
 Currently, @code{g77} does not emit ``true'' debugging information for
 members of a @code{COMMON} area, due to an apparent bug in the GBE.
@@ -9182,7 +9221,7 @@ assigned-label uses of a variable.
 @cindex messages, run-time
 @cindex I/O, errors
 
-The @code{libf2c} library currently has the following table to relate
+The @code{libg2c} library currently has the following table to relate
 error code numbers, returned in @code{IOSTAT=} variables, to messages.
 This information should, in future versions of this document, be
 expanded upon to include detailed descriptions of each message.
@@ -9489,12 +9528,12 @@ The implementation @code{g77} currently uses to make this work is
 one of the few things not compatible with @code{f2c} as currently
 shipped.
 @code{f2c} currently does nothing with @samp{EXTERNAL FOO} except
-issue a warning that @samp{FOO} is not otherwise referenced, and for
-@samp{BLOCK DATA FOO}, f2c doesn't generate a dummy procedure with the
-name @samp{FOO}.
+issue a warning that @samp{FOO} is not otherwise referenced,
+and, for @samp{BLOCK DATA FOO},
+@code{f2c} doesn't generate a dummy procedure with the name @samp{FOO}.
 The upshot is that you shouldn't mix @code{f2c} and @code{g77} in
 this particular case.
-If you use f2c to compile @samp{BLOCK DATA FOO},
+If you use @code{f2c} to compile @samp{BLOCK DATA FOO},
 then any @code{g77}-compiled program unit that says @samp{EXTERNAL FOO}
 will result in an unresolved reference when linked.
 If you do the
@@ -9939,13 +9978,24 @@ The @samp{-falias-check}, @samp{-fargument-alias},
 and @samp{-fno-argument-noalias-global} options,
 introduced in version 0.5.20 and
 @code{g77}'s version 2.7.2.2.f.2 of @code{gcc},
-control the assumptions regarding aliasing
-(overlapping)
-of writes and reads to main memory (core) made
-by the @code{gcc} back end.
+were withdrawn as of @code{g77} version 0.5.23
+due to their not being supported by @code{gcc} version 2.8.
 
-They are effective only when compiling with @samp{-O} (specifying
-any level other than @samp{-O0}) or with @samp{-falias-check}.
+These options, which control the assumptions regarding aliasing
+(overlapping) of writes and reads to main memory (core) made
+by the @code{gcc} back end,
+might well be added back (in some form) in a future version
+of @code{gcc}.
+
+However, these options @emph{are} supported by @code{egcs}.
+
+The information below still is useful, but applies to
+only those versions of @code{g77} that support the
+alias analysis implied by support for these options.
+
+These options are effective only when compiling with @samp{-O}
+(specifying any level other than @samp{-O0})
+or with @samp{-falias-check}.
 
 The default for Fortran code is @samp{-fargument-noalias-global}.
 (The default for C code and code written in other C-based languages
@@ -10069,8 +10119,7 @@ Static analysis is certainly imperfect, as is run-time analysis,
 since neither can catch all violations.
 (Static analysis can catch all likely violations, and some that
 might never actually happen, while run-time analysis can catch
-only those violations that actually happen during a particular
-run.
+only those violations that actually happen during a particular run.
 Neither approach can cope with programs mixing Fortran code with
 routines written in other languages, however.)
 
@@ -10105,20 +10154,21 @@ relevant @code{ERR=} and @code{IOSTAT=} mechanism.
 
 Because of the adverse effects this approach had on the performance
 of many programs, @code{g77} no longer configures @code{libf2c}
+(now named @code{libg2c} in its @code{g77} incarnation)
 to always flush output.
 
 If your program depends on this behavior, either insert the
 appropriate @samp{CALL FLUSH} statements, or modify the sources
-to the @code{libf2c}, rebuild and reinstall @code{g77}, and
+to the @code{libg2c}, rebuild and reinstall @code{g77}, and
 relink your programs with the modified library.
 
-(Ideally, @code{libf2c} would offer the choice at run-time, so
+(Ideally, @code{libg2c} would offer the choice at run-time, so
 that a compile-time option to @code{g77} or @code{f2c} could
 result in generating the appropriate calls to flushing or
 non-flushing library routines.)
 
 @xref{Always Flush Output}, for information on how to modify
-the @code{g77} source tree so that a version of @code{libf2c}
+the @code{g77} source tree so that a version of @code{libg2c}
 can be built and installed with the @samp{ALWAYS_FLUSH} macro defined.
 
 @node Large File Unit Numbers
@@ -10131,25 +10181,24 @@ can be built and installed with the @samp{ALWAYS_FLUSH} macro defined.
 
 If your program crashes at run time with a message including
 the text @samp{illegal unit number}, that probably is
-a message from the run-time library, @code{libf2c}, used, and
-distributed with, @code{g77}.
+a message from the run-time library, @code{libg2c}.
 
 The message means that your program has attempted to use a
 file unit number that is out of the range accepted by
-@code{libf2c}.
+@code{libg2c}.
 Normally, this range is 0 through 99, and the high end
-of the range is controlled by a @code{libf2c} source-file
+of the range is controlled by a @code{libg2c} source-file
 macro named @samp{MXUNIT}.
 
 If you can easily change your program to use unit numbers
 in the range 0 through 99, you should do so.
 
 Otherwise, see @ref{Larger File Unit Numbers}, for information on how
-to change @samp{MXUNIT} in @code{libf2c} so you can build and
-install a new version of @code{libf2c} that supports the larger
+to change @samp{MXUNIT} in @code{libg2c} so you can build and
+install a new version of @code{libg2c} that supports the larger
 unit numbers you need.
 
-@emph{Note:} While @code{libf2c} places a limit on the range
+@emph{Note:} While @code{libg2c} places a limit on the range
 of Fortran file-unit numbers, the underlying library and operating
 system might impose different kinds of limits.
 For example, some systems limit the number of files simultaneously
@@ -10350,6 +10399,32 @@ generally relevant to Fortran,
 but using it will force @code{COMMON} to be padded if necessary to align
 @code{DOUBLE PRECISION} data.
 
+When @code{DOUBLE PRECISION} data is forcibly aligned
+in @code{COMMON} by @code{g77} due to specifying @samp{-malign-double},
+@code{g77} issues a warning about the need to
+insert padding.
+
+In this case, each and every program unit that uses
+the same @code{COMMON} area
+must specify the same layout of variables and their types
+for that area
+and be compiled with @samp{-malign-double} as well.
+@code{g77} will issue warnings in each case,
+but as long as every program unit using that area
+is compiled with the same warnings,
+the resulting object files should work when linked together
+unless the program makes additional assumptions about
+@code{COMMON} area layouts that are outside the scope
+of the FORTRAN 77 standard,
+or uses @code{EQUIVALENCE} or different layouts
+in ways that assume no padding is ever inserted by the compiler.
+
+@emph{Note:} @samp{-malign-double} applies only to
+statically-allocated data.
+Double-precision data on the stack can still
+cause problems due to misalignment.
+@xref{Aligned Data}.
+
 @item
 Ensure that @file{crt0.o} or @file{crt1.o}
 on your system guarantees a 64-bit
@@ -10457,7 +10532,7 @@ or installing @code{g77} is not provided here.
 
 To find out about major bugs discovered in the current release and
 possible workarounds for them, retrieve
-@url{ftp://alpha.gnu.org/g77.plan}.
+@uref{ftp://alpha.gnu.org/g77.plan}.
 
 (Note that some of this portion of the manual is lifted
 directly from the @code{gcc} manual, with minor modifications
@@ -10563,7 +10638,7 @@ How to cope with such problems is well beyond the scope
 of this manual.
 
 However, users of Linux-based systems (such as GNU/Linux)
-should review @code{http://www.bitwizard.nl/sig11}, a source
+should review @uref{http://www.bitwizard.nl/sig11}, a source
 of detailed information on diagnosing hardware problems,
 by recognizing their common symptoms.
 
@@ -10586,12 +10661,12 @@ programs (which should be done using @code{g77}).
 
 If this happens to you, try appending @samp{-lc} to the command you
 use to link the program, e.g. @samp{g77 foo.f -lc}.
-@code{g77} already specifies @samp{-lf2c -lm} when it calls the linker,
+@code{g77} already specifies @samp{-lg2c -lm} when it calls the linker,
 but it cannot also specify @samp{-lc} because not all systems have a
 file named @file{libc.a}.
 
 It is unclear at this point whether there are legitimately installed
-systems where @samp{-lf2c -lm} is insufficient to resolve code produced
+systems where @samp{-lg2c -lm} is insufficient to resolve code produced
 by @code{g77}.
 
 @cindex undefined reference (_main)
@@ -10602,7 +10677,7 @@ by @code{g77}.
 If your program doesn't link due to unresolved references to names
 like @samp{_main}, make sure you're using the @code{g77} command to do the
 link, since this command ensures that the necessary libraries are
-loaded by specifying @samp{-lf2c -lm} when it invokes the @code{gcc}
+loaded by specifying @samp{-lg2c -lm} when it invokes the @code{gcc}
 command to do the actual link.
 (Use the @samp{-v} option to discover
 more about what actually happens when you use the @code{g77} and @code{gcc}
@@ -10634,8 +10709,12 @@ compiled by @code{g77}.
 Inadequate investigation as of the release of 0.5.16 results in not
 knowing which products are the culprit, but @file{gdb-4.14} definitely
 crashes when, for example, an attempt is made to print the contents
-of a @code{COMPLEX(KIND=2)} dummy array, on at least some GNU/Linux machines, plus
-some others.
+of a @code{COMPLEX(KIND=2)} dummy array, on at least some GNU/Linux
+machines, plus some others.
+Attempts to access assumed-size arrays are
+also known to crash recent versions of @code{gdb}.
+(@code{gdb}'s Fortran support was done for a different compiler
+and isn't properly compatible with @code{g77}.)
 
 @node NeXTStep Problems
 @subsection NeXTStep Problems
@@ -10916,7 +10995,7 @@ When compiled by @code{g77}, the above program might output
 executable that outputs @samp{0.2}.
 
 This particular difference is due to the fact that, currently,
-conversion of floating-point values by the @code{libf2c} library,
+conversion of floating-point values by the @code{libg2c} library,
 used by @code{g77}, handles only double-precision values.
 
 Since @samp{0.2} in the program is a single-precision value, it
@@ -10958,7 +11037,7 @@ PRINT *, 0.2D0
 END
 @end smallexample
 
-Future versions of @code{g77} and/or @code{libf2c} might convert
+Future versions of @code{g77} and/or @code{libg2c} might convert
 single-precision values directly to decimal,
 instead of converting them to double precision first.
 This would tend to result in output that is more consistent
@@ -11320,7 +11399,7 @@ specifiers.
 
 @code{g77} doesn't support @samp{FORMAT(I<J>)} and the like.
 Supporting this requires a significant redesign or replacement
-of @code{libf2c}.
+of @code{libg2c}.
 
 However, @code{g77} does support
 this construct when the expression is constant
@@ -11370,7 +11449,7 @@ code to specify explicit assembler code.
 The @code{Q} edit descriptor in @code{FORMAT}s isn't supported.
 (This is meant to get the number of characters remaining in an input record.)
 Supporting this requires a significant redesign or replacement
-of @code{libf2c}.
+of @code{libg2c}.
 
 A workaround might be using internal I/O or the stream-based intrinsics.
 @xref{FGetC Intrinsic (subroutine)}.
@@ -11426,7 +11505,7 @@ replaced by @samp{READ fmt,list}.
 This set of extensions is quite a bit
 lower on the list of large, important things to add to @code{g77}, partly
 because it requires a great deal of work either upgrading or
-replacing @code{libf2c}.
+replacing @code{libg2c}.
 
 @node OPEN CLOSE and INQUIRE Keywords
 @subsection @code{OPEN}, @code{CLOSE}, and @code{INQUIRE} Keywords
@@ -11441,7 +11520,7 @@ replacing @code{libf2c}.
 @code{g77} doesn't have support for keywords such as @code{DISP='DELETE'} in
 the @code{OPEN}, @code{CLOSE}, and @code{INQUIRE} statements.
 These extensions are easy to add to @code{g77} itself, but
-require much more work on @code{libf2c}.
+require much more work on @code{libg2c}.
 
 @node ENCODE and DECODE
 @subsection @code{ENCODE} and @code{DECODE}
@@ -11581,7 +11660,7 @@ The @code{gcc} backend and, consequently, @code{g77}, currently provides no
 control over whether or not floating-point exceptions are trapped or
 ignored.
 (Ignoring them typically results in NaN values being
-propagated in systems that conform to IEEE 754.)
+propagated in systems that conform to IEEE 754.)
 The behaviour is inherited from the system-dependent startup code.
 
 Most systems provide some C-callable mechanism to change this; this can
@@ -11629,7 +11708,7 @@ allocation of automatic arrays in heap storage.
 @cindex threads
 @cindex parallel processing
 
-Neither the code produced by @code{g77} nor the @code{libf2c} library
+Neither the code produced by @code{g77} nor the @code{libg2c} library
 are thread-safe, nor does @code{g77} have support for parallel processing
 (other than the instruction-level parallelism available on some
 processors).
@@ -12156,7 +12235,8 @@ number---producing different computational results.)
 
 The reason this misfeature is dangerous is that a slight,
 apparently innocuous change to the source code can change
-the computational results.  Consider:
+the computational results.
+Consider:
 
 @smallexample
 REAL ALMOST, CLOSE
@@ -12414,7 +12494,7 @@ If it isn't known, then you should report the problem.
 Reporting a bug might help you by bringing a solution to your problem, or
 it might not.
 (If it does not, look in the service directory; see
-@ref{Service}.)
+@ref{Service}.)
 In any case, the principal function of a bug report is
 to help the entire community by making the next version of GNU Fortran work
 better.
@@ -12550,14 +12630,14 @@ their use into selective changes in your own code.
 @pindex ftncheck
 Validate your code with @code{ftnchek} or a similar code-checking
 tool.
-@code{ftncheck} can be found at @url{ftp://ftp.netlib.org/fortran}
-or @url{ftp://ftp.dsm.fordham.edu}.
+@code{ftncheck} can be found at @uref{ftp://ftp.netlib.org/fortran}
+or @uref{ftp://ftp.dsm.fordham.edu}.
 
 @pindex make
 @cindex Makefile example
 Here are some sample @file{Makefile} rules using @code{ftnchek}
 ``project'' files to do cross-file checking and @code{sfmakedepend}
-(from @url{ftp://ahab.rutgers.edu/pub/perl/sfmakedepend})
+(from @uref{ftp://ahab.rutgers.edu/pub/perl/sfmakedepend})
 to maintain dependencies automatically.
 These assume the use of GNU @code{make}.
 
@@ -13308,7 +13388,7 @@ the feature-adding work.
 @itemize @bullet
 @item
 Do the equivalent of the trick of putting @samp{extern inline} in front
-of every function definition in @code{libf2c} and #include'ing the resulting
+of every function definition in @code{libg2c} and #include'ing the resulting
 file in @code{f2c}+@code{gcc}---that is, inline all run-time-library functions
 that are at all worth inlining.
 (Some of this has already been done, such as for integral exponentiation.)
@@ -13343,7 +13423,7 @@ Among the important things the library would do are:
 @item
 Be a one-stop-shop-type
 library, hence shareable and usable by all, in that what are now
-library-build-time options in @code{libf2c} would be moved at least to the
+library-build-time options in @code{libg2c} would be moved at least to the
 @code{g77} compile phase, if not to finer grains (such as choosing how
 list-directed I/O formatting is done by default at @code{OPEN} time, for
 preconnected units via options or even statements in the main program
@@ -13386,7 +13466,7 @@ very useful.
 
 @itemize @bullet
 @item
-A new library (replacing @code{libf2c}) should improve portability as well as
+A new library (replacing @code{libg2c}) should improve portability as well as
 produce more optimal code.
 Further, @code{g77} and the new library should
 conspire to simplify naming of externals, such as by removing unnecessarily
@@ -13463,7 +13543,7 @@ Support @samp{OPEN(@dots{},KEY=(@dots{}),@dots{})}.
 @item
 Support arbitrary file unit numbers, instead of limiting them
 to 0 through @samp{MXUNIT-1}.
-(This is a @code{libf2c} issue.)
+(This is a @code{libg2c} issue.)
 
 @item
 @samp{OPEN(NOSPANBLOCKS,@dots{})} is treated as
@@ -13487,7 +13567,7 @@ for @code{%FILL} in @code{STRUCTURE} and related syntax,
 whereas the rest of the
 stuff has at least some parsing support.
 This requires either major
-changes to @code{libf2c} or its replacement.
+changes to @code{libg2c} or its replacement.
 
 @item
 F90 and @code{g77} probably disagree about label scoping relative to
@@ -13720,6 +13800,7 @@ as the above is just a sample, no such section exists.
 * INTGLOB::     Intrinsic also used as name of global.
 * LEX::         Various lexer messages
 * GLOBALS::     Disagreements about globals.
+* LINKFAIL::    When linking @samp{f771} fails.
 @end menu
 
 @node CMPAMBIG
@@ -14218,6 +14299,34 @@ In particular, the code might appear to work on a particular
 system, but have bugs that affect the reliability of the data
 without exhibiting any other outward manifestations of the bugs.
 
+@node LINKFAIL
+@section @code{LINKFAIL}
+
+@noindent
+@smallexample
+If the above command failed due to an unresolved reference
+to strtoul, _strtoul, bsearch, _bsearch, or similar, see
+[info -f g77 M LINKFAIL] (a node in the g77 documentation)
+for information on what causes this, how to work around
+the problem by editing $@{srcdir@}/proj.c, and what else to do.
+@end smallexample
+
+@xref{Missing strtoul or bsearch}, for more information on
+this problem,
+which occurs only in releases of @code{g77}
+based on @code{gcc}.
+(It does not occur in @code{egcs}.)
+
+On AIX 4.1, @code{g77} might not build with the native (non-GNU) tools
+due to a linker bug in coping with the @samp{-bbigtoc} option
+which leads to a @samp{Relocation overflow} error.
+
+Compiling with @samp{-mminimal-toc}
+might solve this problem, e.g.@: by adding
+@smallexample
+BOOT_CFLAGS='-mminimal-toc -O2 -g'
+@end smallexample
+to the @code{make bootstrap} command line.
 @end ifset
 
 @node Index
index e1a9ec31a625897c64ebbfd1f29ed3b979831da3..5bed8c133bb9aee1b31253059bbce467c4ad4017 100644 (file)
@@ -5,10 +5,20 @@
 @c The text of this file appears in the file INSTALL
 @c in the G77 distribution, as well as in the G77 manual.
 
-@c 1998-05-20
-
-Note most of this information is out of date and superceded by the EGCS
-install procedures.  It is provided for historical reference only.
+@c 1998-05-29
+
+@set version-g77 0.5.23
+@set version-gcc 2.8.1
+@set version-autoconf 2.12
+@set version-bison 1.25
+@set version-gperf 2.5
+@set version-gzip 1.2.4
+@set version-make 3.76.1
+@set version-makeinfo 1.68
+@set version-patch 2.5
+@set version-sed 2.05
+@set version-tar 1.12
+@set version-texinfo 3.11
 
 @ifclear INSTALLONLY
 @node Installation
@@ -18,6 +28,12 @@ install procedures.  It is provided for historical reference only.
 
 The following information describes how to install @code{g77}.
 
+Note that, for @code{egcs} users,
+much of this information is obsolete,
+and is superceded by the
+@code{egcs} installation procedures.
+Such information is explicitly flagged as such.
+
 The information in this file generally pertains to dealing
 with @emph{source} distributions of @code{g77} and @code{gcc}.
 It is possible that some of this information will be applicable
@@ -43,6 +59,9 @@ are ongoing.
 @section Prerequisites
 @cindex prerequisites
 
+For @code{egcs} users, the following information is
+superceded by the @code{egcs} installation instructions.
+
 The procedures described to unpack, configure, build, and
 install @code{g77} assume your system has certain programs
 already installed.
@@ -51,7 +70,7 @@ The following prerequisites should be met by your
 system before you follow the @code{g77} installation instructions:
 
 @table @asis
-@item @code{gzip}
+@item @code{gzip} and @code{tar}
 To unpack the @code{gcc} and @code{g77} distributions,
 you'll need the @code{gunzip} utility in the @code{gzip}
 distribution.
@@ -64,21 +83,20 @@ There are GNU versions of all these available---in fact,
 a complete GNU UNIX system can be put together on
 most systems, if desired.
 
-=======
 The version of GNU @code{gzip} used to package this release
-is 1.2.4.
+is @value{version-gzip}.
 (The version of GNU @code{tar} used to package this release
-is 1.12.)
+is @value{version-tar}.)
 
-@item @file{gcc-2.7.2.3.tar.gz}
+@item @file{gcc-@value{version-gcc}.tar.gz}
 You need to have this, or some other applicable, version
 of @code{gcc} on your system.
 The version should be an exact copy of a distribution
 from the FSF.
-Its size is approximately 7.1MB.
+Its size is approximately 8.4MB.
 
-If you've already unpacked @file{gcc-2.7.2.3.tar.gz} into a
-directory (named @file{gcc-2.7.2.3}) called the @dfn{source tree}
+If you've already unpacked @file{gcc-@value{version-gcc}.tar.gz} into a
+directory (named @file{gcc-@value{version-gcc}}) called the @dfn{source tree}
 for @code{gcc}, you can delete the distribution
 itself, but you'll need to remember to skip any instructions to unpack
 this distribution.
@@ -87,11 +105,11 @@ Without an applicable @code{gcc} source tree, you cannot
 build @code{g77}.
 You can obtain an FSF distribution of @code{gcc} from the FSF.
 
-@item @file{g77-0.5.21.tar.gz}
+@item @file{g77-@value{version-g77}.tar.gz}
 You probably have already unpacked this package,
 or you are reading an advance copy of these installation instructions,
 which are contained in this distribution.
-The size of this package is approximately 1.5MB.
+The size of this package is approximately 1.4MB.
 
 You can obtain an FSF distribution of @code{g77} from the FSF,
 the same way you obtained @code{gcc}.
@@ -103,7 +121,7 @@ using, how you build @code{g77}, and how much of it you
 install (primarily, which languages you install).
 
 The sizes shown below assume all languages distributed
-in @code{gcc-2.7.2.3}, plus @code{g77}, will be built
+in @code{gcc-@value{version-gcc}}, plus @code{g77}, will be built
 and installed.
 These sizes are indicative of GNU/Linux systems on
 Intel x86 running COFF and on Digital Alpha (AXP) systems
@@ -118,8 +136,8 @@ before the public beta release.
 
 @itemize ---
 @item
-@code{gcc} and @code{g77} distributions occupy 8.6MB
-packed, 35MB unpacked.
+@code{gcc} and @code{g77} distributions occupy 10MB
+packed, 40MB unpacked.
 These consist of the source code and documentation,
 plus some derived files (mostly documentation), for
 @code{gcc} and @code{g77}.
@@ -127,14 +145,14 @@ Any deviations from these numbers for different
 kinds of systems are likely to be very minor.
 
 @item
-A ``bootstrap'' build requires an additional 67.3MB
-for a total of 102MB on an ix86, and an additional
-98MB for a total of 165MB on an Alpha.
+A ``bootstrap'' build requires an additional 91MB
+for a total of 132MB on an ix86, and an additional
+136MB for a total of 177MB on an Alpha.
 
 @item
 Removing @file{gcc/stage1} after the build recovers
-10.7MB for a total of 91MB on an ix86, and recovers
-??MB for a total of ??MB on an Alpha.
+13MB for a total of 119MB on an ix86, and recovers
+21MB for a total of 155MB on an Alpha.
 
 After doing this, the integrity of the build can
 still be verified via @samp{make compare}, and the
@@ -144,8 +162,8 @@ kept in @code{gcc/stage2}.
 
 @item
 Removing @file{gcc/stage2} after the build further
-recovers 27.3MB for a total of 64.3MB, and recovers
-??MB for a total of ??MB on an Alpha.
+recovers 39MB for a total of 80MB, and recovers
+57MB for a total of 98MB on an Alpha.
 
 After doing this, the compiler can still be installed,
 especially if GNU @code{make} is used to avoid
@@ -154,9 +172,9 @@ by hand).
 
 @item
 Installing @code{gcc} and @code{g77} copies
-14.9MB onto the @samp{--prefix} disk for a total of 79.2MB
-on an ix86, and copies ??MB onto the @samp{--prefix}
-disk for a total of ??MB on an Alpha.
+23MB onto the @samp{--prefix} disk for a total of 103MB
+on an ix86, and copies 31MB onto the @samp{--prefix}
+disk for a total of 130MB on an Alpha.
 @end itemize
 
 After installation, if no further modifications and
@@ -190,70 +208,40 @@ The rest of the new installation is done without
 replacing existing installed versions (assuming
 they have different version numbers).
 
-@item @code{patch}
-Although you can do everything @code{patch} does yourself,
-by hand, without much trouble, having @code{patch} installed
-makes installation of new versions of GNU utilities such as
-@code{g77} so much easier that it is worth getting.
-You can obtain @code{patch} the same way you obtained
-@code{gcc} and @code{g77}.
-
-In any case, you can apply patches by hand---patch files
-are designed for humans to read them.
-
-The version of GNU @code{patch} used to develop this release
-is 2.5.
-
 @item @code{make}
 Your system must have @code{make}, and you will probably save
 yourself a lot of trouble if it is GNU @code{make} (sometimes
 referred to as @code{gmake}).
+In particular, you probably need GNU @code{make}
+to build outside the source directory
+(with @code{configure}'s @samp{--srcdir} option.)
 
 The version of GNU @code{make} used to develop this release
-is 3.76.1.
+is @value{version-make}.
 
 @item @code{cc}
 Your system must have a working C compiler.
+If it doesn't, you might be able to obtain
+a prebuilt binary of some version of @code{gcc}
+from the network or on CD-ROM,
+perhaps from the FSF@.
+The best source of information about binaries
+is probably a system-specific Usenet news group,
+initially via its FAQ.
 
 @xref{Installation,,Installing GNU CC,gcc,Using and Porting GNU CC},
 for more information on prerequisites for installing @code{gcc}.
 
-@item @code{bison}
-If you do not have @code{bison} installed, you can usually
-work around any need for it, since @code{g77} itself does
-not use it, and @code{gcc} normally includes all files
-generated by running it in its distribution.
-You can obtain @code{bison} the same way you obtained
-@code{gcc} and @code{g77}.
-
-The version of GNU @code{bison} used to develop this release
-is 1.25.
-
-@xref{Missing bison?},
-for information on how to work around not having @code{bison}.
-
-@item @code{makeinfo}
-If you are missing @code{makeinfo}, you can usually work
-around any need for it.
-You can obtain @code{makeinfo} the same way you obtained
-@code{gcc} and @code{g77}.
-
-The version of GNU @code{makeinfo} used to develop this release
-is 1.68, from GNU @code{texinfo} version 3.11.
-
-@xref{Missing makeinfo?},
-for information on getting around the lack of @code{makeinfo}.
-
 @item @code{sed}
 All UNIX systems have @code{sed}, but some have a broken
 version that cannot handle configuring, building, or
 installing @code{gcc} or @code{g77}.
 
 The version of GNU @code{sed} used to develop this release
-is 2.05.
+is @value{version-sed}.
 (Note that GNU @code{sed} version 3.0 was withdrawn by the
 FSF---if you happen to have this version installed, replace
-it with version 2.05 immediately.
+it with version @value{version-sed} immediately.
 See a GNU distribution site for further explanation.)
 
 @item @code{root} access or equivalent
@@ -274,6 +262,69 @@ System administrators with more experience will want to
 determine for themselves how they want to modify the
 procedures described below to suit the needs of their
 installation.
+
+@item @code{autoconf}
+The version of GNU @code{autoconf} used to develop this release
+is @value{version-autoconf}.
+
+@code{autoconf} is not needed in the typical case of
+installing @code{gcc} and @code{g77}.
+@xref{Missing tools?}, for information on when it
+might be needed and how to work around not having it.
+
+@item @code{bison}
+The version of GNU @code{bison} used to develop this release
+is @value{version-bison}.
+
+@code{bison} is not needed in the typical case of
+installing @code{gcc} and @code{g77}.
+@xref{Missing tools?}, for information on when it
+might be needed and how to work around not having it.
+
+@item @code{gperf}
+The version of GNU @code{gperf} used to develop this release
+is @value{version-gperf}.
+
+@code{gperf} is not needed in the typical case of
+installing @code{gcc} and @code{g77}.
+@xref{Missing tools?}, for information on when it
+might be needed and how to work around not having it.
+
+@item @code{makeinfo}
+The version of GNU @code{makeinfo} used to develop this release
+is @value{version-makeinfo}.
+
+@code{makeinfo} is part of the GNU @code{texinfo} package;
+@code{makeinfo} version @value{version-makeinfo}
+is distributed as part of
+GNU @code{texinfo} version @value{version-texinfo}.
+
+@code{makeinfo} is not needed in the typical case of
+installing @code{gcc} and @code{g77}.
+@xref{Missing tools?}, for information on when it
+might be needed and how to work around not having it.
+
+An up-to-date version of GNU @code{makeinfo} is still convenient
+when obtaining a new version of a GNU distribution such as
+@code{gcc} or @code{g77},
+as it allows you to obtain the @file{.diff.gz} file
+instead of the entire @file{.tar.gz} distribution
+(assuming you have installed @code{patch}).
+
+@item @code{patch}
+The version of GNU @code{patch} used to develop this release
+is @value{version-patch}.
+
+Beginning with @code{g77} version 0.5.23, it is no longer
+necessary to patch the @code{gcc} back end to build @code{g77}.
+
+An up-to-date version of GNU @code{patch} is still convenient
+when obtaining a new version of a GNU distribution such as
+@code{gcc} or @code{g77},
+as it allows you to obtain the @file{.diff.gz} file
+instead of the entire @file{.tar.gz} distribution
+(assuming you have installed the tools needed
+to rebuild derived files, such as @code{makeinfo}).
 @end table
 
 @node Problems Installing
@@ -291,6 +342,7 @@ either @code{gcc} or @code{g77}.
 
 @menu
 * General Problems::         Problems afflicting most or all systems.
+* System-specific Problems:: Problems afflicting particular systems.
 * Cross-compiler Problems::  Problems afflicting cross-compilation setups.
 @end menu
 
@@ -301,12 +353,11 @@ These problems can occur on most or all systems.
 
 @menu
 * GNU C Required::             Why even ANSI C is not enough.
-* Patching GNU CC Necessary::  Why @code{gcc} must be patched first.
+* Patching GNU CC::            Why @code{gcc} needn't be patched.
 * Building GNU CC Necessary::  Why you can't build @emph{just} Fortran.
-* Missing strtoul::            If linking @code{f771} fails due to an
-                                unresolved reference to @code{strtoul}.
-* Cleanup Kills Stage Directories::  A minor nit for @code{g77} developers.
-* Missing gperf?::             When building requires @code{gperf}.
+* Missing strtoul or bsearch:: When linking @samp{f771} fails.
+* Cleanup Kills Stage Directories::  For @code{g77} developers.
+* LANGUAGES Macro Ignored::    Sometimes @samp{LANGUAGES} is ignored.
 @end menu
 
 @node GNU C Required
@@ -328,25 +379,16 @@ bootstrap build to automate the process of first building
 @code{g77} and rebuilding @code{gcc} using that just-built @code{gcc},
 and so on.
 
-@node Patching GNU CC Necessary
-@subsubsection Patching GNU CC Necessary
+@node Patching GNU CC
+@subsubsection Patching GNU CC
 @cindex patch files
 @cindex GBE
 
-@code{g77} currently requires application of a patch file to the gcc compiler
-tree.
-The necessary patches should be folded in to the mainline gcc distribution.
-
-Some combinations
-of versions of @code{g77} and @code{gcc} might actually @emph{require} no
-patches, but the patch files will be provided anyway as long as
-there are more changes expected in subsequent releases.
-These patch files might contain
-unnecessary, but possibly helpful, patches.
-As a result, it is possible this issue might never be
-resolved, except by eliminating the need for the person
-configuring @code{g77} to apply a patch by hand, by going
-to a more automated approach (such as configure-time patching).
+@code{g77} no longer requires application of a patch file
+to the @code{gcc} compiler tree.
+In fact, no such patch file is distributed with @code{g77}.
+This is as of version 0.5.23
+and @code{egcs} version 1.0.
 
 @node Building GNU CC Necessary
 @subsubsection Building GNU CC Necessary
@@ -357,44 +399,73 @@ It should be possible to build the runtime without building @code{cc1}
 and other non-Fortran items, but, for now, an easy way to do that
 is not yet established.
 
-@node Missing strtoul
-@subsubsection Missing strtoul
+@node Missing strtoul or bsearch
+@subsubsection Missing strtoul or bsearch
+@cindex bsearch
+@cindex _bsearch
 @cindex strtoul
 @cindex _strtoul
+@cindex undefined reference (_bsearch)
 @cindex undefined reference (_strtoul)
 @cindex f771, linking error for
 @cindex linking error for f771
 @cindex ld error for f771
+@cindex ld can't find _bsearch
 @cindex ld can't find _strtoul
 @cindex SunOS4
 
-On SunOS4 systems, linking the @code{f771} program produces
-an error message concerning an undefined symbol named
-@samp{_strtoul}.
-
-This is not a @code{g77} bug.
-@xref{Patching GNU Fortran}, for information on
-a workaround provided by @code{g77}.
-
-The proper fix is either to upgrade your system to one that
-provides a complete ANSI C environment, or improve @code{gcc} so
-that it provides one for all the languages and configurations it supports.
-
-@emph{Note:} In earlier versions of @code{g77}, an automated
-workaround for this problem was attempted.
-It worked for systems without @samp{_strtoul}, substituting
-the incomplete-yet-sufficient version supplied with @code{g77}
-for those systems.
-However, the automated workaround failed mysteriously for systems
-that appeared to have conforming ANSI C environments, and it
-was decided that, lacking resources to more fully investigate
-the problem, it was better to not punish users of those systems
-either by requiring them to work around the problem by hand or
-by always substituting an incomplete @code{strtoul()} implementation
-when their systems had a complete, working one.
-Unfortunately, this meant inconveniencing users of systems not
-having @code{strtoul()}, but they're using obsolete (and generally
-unsupported) systems anyway.
+The following information does not apply to the
+@code{egcs} version of @code{g77}.
+
+On SunOS4 systems, linking the @code{f771} program used to
+produce an error message concerning an undefined symbol named
+@samp{_strtoul}, because the @samp{strtoul} library function
+is not provided on that system.
+
+Other systems have, in the past, been reported to not provide
+their own @samp{strtoul} or @samp{bsearch} function.
+
+Some versions @code{g77} tried to default to providing bare-bones
+versions of @code{bsearch} and @code{strtoul} automatically,
+but every attempt at this has failed for at least one kind of system.
+
+To limit the failures to those few systems actually missing the
+required routines, the bare-bones versions are still provided,
+in @file{gcc/f/proj.c},
+if the appropriate macros are defined.
+These are @code{NEED_BSEARCH} for @samp{bsearch} and
+@code{NEED_STRTOUL} for @samp{NEED_STRTOUL}.
+
+Therefore, if you are sure your system is missing
+@code{bsearch} or @code{strtoul} in its library,
+define the relevant macro(s) before building @code{g77}.
+This can be done by editing @file{gcc/f/proj.c} and inserting
+either or both of the following @samp{#define} statements
+before the comment shown:
+
+@smallexample
+/* Insert #define statements here.  */
+
+#define NEED_BSEARCH
+#define NEED_STRTOUL
+@end smallexample
+
+Then, continue configuring and building @code{g77} as usual.
+
+Or, you can define these on the @code{make} command line.
+To build with the bundled @code{cc} on SunOS4, for example, try:
+@smallexample
+make bootstrap BOOT_CFLAGS='-O2 -g -DNEED_STRTOUL'
+@end smallexample
+
+If you then encounter problems compiling @file{gcc/f/proj.c},
+it might be due to a discrepancy between how @samp{bsearch}
+or @samp{strtoul} are defined by that file and how they're
+declared by your system's header files.
+
+In that case, you'll have to use some basic knowledge of C
+to work around the problem, perhaps by editing @file{gcc/f/proj.c}
+somewhat.
 
 @node Cleanup Kills Stage Directories
 @subsubsection Cleanup Kills Stage Directories
@@ -406,47 +477,50 @@ would create the various @file{stage@var{n}} directories and their
 subdirectories, so developers and expert installers wouldn't have to
 reconfigure after cleaning up.
 
-@node Missing gperf?
-@subsubsection Missing @code{gperf}?
-@cindex @code{gperf}
-@cindex missing @code{gperf}
-
-If a build aborts trying to invoke @code{gperf}, that
-strongly suggests an improper method was used to
-create the @code{gcc} source directory,
-such as the UNIX @samp{cp -r} command instead
-of @samp{cp -pr}, since this problem very likely
-indicates that the date-time-modified information on
-the @code{gcc} source files is incorrect.
-
-The proper solution is to recreate the @code{gcc} source
-directory from a @code{gcc} distribution known to be
-provided by the FSF.
-
-It is possible you might be able to temporarily
-work around the problem, however, by trying these
-commands:
-
-@example
-sh# @kbd{cd gcc}
-sh# @kbd{touch c-gperf.h}
-sh#
-@end example
-
-These commands update the date-time-modified information for
-the file produced by the invocation of @code{gperf}
-in the current versions of @code{gcc}, so that @code{make} no
-longer believes it needs to update it.
-This file should already exist in a @code{gcc}
-distribution, but mistakes made when copying the @code{gcc}
-directory can leave the modification information
-set such that the @code{gperf} input files look more ``recent''
-than the corresponding output files.
-
-If the above does not work, definitely start from scratch
-and avoid copying the @code{gcc} using any method that does
-not reliably preserve date-time-modified information, such
-as the UNIX @samp{cp -r} command.
+That help has arrived as of version 0.5.23 of @code{g77}
+and version 1.1 of @code{egcs}.
+Configuration itself no longer creates any particular directories
+that are unique to @code{g77}.
+The build procedures in @file{Make-lang.in} take care of
+that, on demand.
+
+@node LANGUAGES Macro Ignored
+@subsubsection LANGUAGES Macro Ignored
+@cindex @samp{LANGUAGES} macro ignored
+@cindex ignoring @samp{LANGUAGES} macro
+
+Prior to version 0.5.23 of @code{g77}
+and version 1.1 of @code{egcs},
+@code{g77} would sometimes ignore
+the absence of @samp{f77} and @samp{F77} in the
+@samp{LANGUAGES} macro definition used for the
+@code{make} command being processed.
+
+As of @code{g77} version 0.5.23
+and @code{egcs} version 1.1,
+@code{g77} now obeys this macro
+in all relevant situations.
+
+However, in versions of @code{gcc} through 2.8.1,
+non-@code{g77} portions of @code{gcc},
+such as @code{g++},
+are known to go ahead and perform various
+language-specific activities when their
+respective language strings do not appear
+in the @samp{LANGUAGES} macro in effect
+during that invocation of @code{make}.
+
+It is expected that these remaining problems will
+be fixed in a future version of @code{gcc}.
+
+@node System-specific Problems
+@subsection System-specific Problems
+
+@cindex AIX
+A linker bug on some versions of AIX 4.1 might prevent building
+when @code{g77} is built within @code{gcc}.
+It might also occur when building within @code{egcs}.
+@xref{LINKFAIL}.
 
 @node Cross-compiler Problems
 @subsection Cross-compiler Problems
@@ -492,14 +566,16 @@ For example, it might not know how to handle floating-point
 constants.
 
 @item
-Improvements to the way @code{libf2c} is built could make
+Improvements to the way @code{libg2c} is built could make
 building @code{g77} as a cross-compiler easier---for example,
 passing and using @samp{$(LD)} and @samp{$(AR)} in the appropriate
 ways.
+(This is improved in the @code{egcs} version of @code{g77},
+especially as of version 1.1.)
 
 @item
 There are still some challenges putting together the right
-run-time libraries (needed by @code{libf2c}) for a target
+run-time libraries (needed by @code{libg2c}) for a target
 system, depending on the systems involved in the configuration.
 (This is a general problem with cross-compilation, and with
 @code{gcc} in particular.)
@@ -601,9 +677,9 @@ reporting (immediate flagging of errors during writes) versus
 asynchronous, or, more precisely, buffered error reporting
 (detection of errors might be delayed).
 
-@code{libf2c} supports flagging write errors immediately when
+@code{libg2c} supports flagging write errors immediately when
 it is built with the @samp{ALWAYS_FLUSH} macro defined.
-This results in a @code{libf2c} that runs slower, sometimes
+This results in a @code{libg2c} that runs slower, sometimes
 quite a bit slower, under certain circumstances---for example,
 accessing files via the networked file system NFS---but the
 effect can be more reliable, robust file I/O.
@@ -612,21 +688,19 @@ If you know that Fortran programs requiring this level of precision
 of error reporting are to be compiled using the
 version of @code{g77} you are building, you might wish to
 modify the @code{g77} source tree so that the version of
-@code{libf2c} is built with the @samp{ALWAYS_FLUSH} macro
+@code{libg2c} is built with the @samp{ALWAYS_FLUSH} macro
 defined, enabling this behavior.
 
-To do this, find this line in @file{f/runtime/configure.in} in
+To do this, find this line in @file{f/runtime/f2c.h} in
 your @code{g77} source tree:
 
 @example
-dnl AC_DEFINE(ALWAYS_FLUSH)
+/* #define ALWAYS_FLUSH */
 @end example
 
-Remove the leading @samp{dnl@w{ }}, so the line begins with
-@samp{AC_DEFINE(}, and run @code{autoconf} in that file's directory.
-(Or, if you don't have @code{autoconf}, you can modify @file{f2c.h.in}
-in the same directory to include the line @samp{#define ALWAYS_FLUSH}
-after @samp{#define F2C_INCLUDE}.)
+Remove the leading @samp{/*@w{ }},
+so the line begins with @samp{#define},
+and the trailing @samp{@w{ }*/}.
 
 Then build or rebuild @code{g77} as appropriate.
 
@@ -661,7 +735,7 @@ The @code{g77} build will crash if an attempt is made to build
 it as a cross-compiler
 for a target when @code{g77} cannot reliably determine the bit pattern of
 floating-point constants for the target.
-Planned improvements for g77-0.6
+Planned improvements for version 0.6 of @code{g77}
 will give it the capabilities it needs to not have to crash the build
 but rather generate correct code for the target.
 (Currently, @code{g77}
@@ -741,6 +815,9 @@ systems.
 @section Quick Start
 @cindex quick start
 
+For @code{egcs} users, the following information is
+superceded by the @code{egcs} installation instructions.
+
 This procedure configures, builds, and installs @code{g77}
 ``out of the box'' and works on most UNIX systems.
 Each command is identified by a unique number,
@@ -763,8 +840,8 @@ already reside in @file{/usr/FSF}, a naming convention
 used by the author of @code{g77} on his own system:
 
 @example
-/usr/FSF/gcc-2.7.2.3.tar.gz
-/usr/FSF/g77-0.5.21.tar.gz
+/usr/FSF/gcc-@value{version-gcc}.tar.gz
+/usr/FSF/g77-@value{version-g77}.tar.gz
 @end example
 
 @c (You can use @file{gcc-2.7.2.1.tar.gz} instead, or
@@ -774,27 +851,28 @@ used by the author of @code{g77} on his own system:
 @c if you remember to make the appropriate adjustments in the
 @c instructions below.)
 
-@cindex SunOS4
-Users of the following systems should not blindly follow
-these quick-start instructions, because of problems their
-systems have coping with straightforward installation of
-@code{g77}:
+@c @cindex SunOS4
+@c Users of the following systems should not blindly follow
+@c these quick-start instructions, because of problems their
+@c systems have coping with straightforward installation of
+@c @code{g77}:
+@c 
+@c @itemize @bullet
+@c @item
+@c SunOS4
+@c @end itemize
+@c 
+@c Instead, see @ref{Complete Installation}, for detailed information
+@c on how to configure, build, and install @code{g77} for your
+@c particular system.
+@c Also, see @ref{Trouble,,Known Causes of Trouble with GNU Fortran},
+@c for information on bugs and other problems known to afflict the
+@c installation process, and how to report newly discovered ones.
+@c 
+@c If your system is @emph{not} on the above list, and @emph{is}
+@c a UNIX system or one of its variants, you should be able to
+@c follow the instructions below.
 
-@itemize @bullet
-@item
-SunOS4
-@end itemize
-
-Instead, see @ref{Complete Installation}, for detailed information
-on how to configure, build, and install @code{g77} for your
-particular system.
-Also, see @ref{Trouble,,Known Causes of Trouble with GNU Fortran},
-for information on bugs and other problems known to afflict the
-installation process, and how to report newly discovered ones.
-
-If your system is @emph{not} on the above list, and @emph{is}
-a UNIX system or one of its variants, you should be able to
-follow the instructions below.
 If you vary @emph{any} of the steps below, you might run into
 trouble, including possibly breaking existing programs for
 other users of your system.
@@ -805,55 +883,42 @@ These explanations follow this list of steps.
 @example
 sh[ 1]# @kbd{cd /usr/src}
 @set source-dir 1
-sh[ 2]# @kbd{gunzip -c < /usr/FSF/gcc-2.7.2.3.tar.gz | tar xf -}
+sh[ 2]# @kbd{gunzip -c < /usr/FSF/gcc-@value{version-gcc}.tar.gz | tar xf -}
 [Might say "Broken pipe"...that is normal on some systems.]
 @set unpack-gcc 2
-sh[ 3]# @kbd{gunzip -c < /usr/FSF/g77-0.5.21.tar.gz | tar xf -}
+sh[ 3]# @kbd{gunzip -c < /usr/FSF/g77-@value{version-g77}.tar.gz | tar xf -}
 ["Broken pipe" again possible.]
 @set unpack-g77 3
-sh[ 4]# @kbd{ln -s gcc-2.7.2.3 gcc}
+sh[ 4]# @kbd{ln -s gcc-@value{version-gcc} gcc}
 @set link-gcc 4
-sh[ 5]# @kbd{ln -s g77-0.5.21 g77}
+sh[ 5]# @kbd{ln -s g77-@value{version-g77} g77}
 @set link-g77 5
 sh[ 6]# @kbd{mv -i g77/* gcc}
 [No questions should be asked by mv here; or, you made a mistake.]
 @set merge-g77 6
-sh[ 7]# @kbd{patch -p1 -V t -d gcc < gcc/f/gbe/2.7.2.3.diff}
-[Unless patch complains about rejected patches, this step worked.]
-@set apply-patch 7
-sh[ 8]# @kbd{cd gcc}
-sh[ 9]# @kbd{touch f77-install-ok}
-[Do not do the above if your system already has an f77
-command, unless you've checked that overwriting it
-is okay.]
-@set f77-install-ok 9
-sh[10]# @kbd{touch f2c-install-ok}
-[Do not do the above if your system already has an f2c
-command, unless you've checked that overwriting it
-is okay.  Else, @kbd{touch f2c-exists-ok}.]
-@set f2c-install-ok 10
-sh[11]# @kbd{./configure --prefix=/usr}
+sh[ 7]# @kbd{cd gcc}
+sh[ 8]# @kbd{./configure --prefix=/usr}
 [Do not do the above if gcc is not installed in /usr/bin.
 You might need a different @kbd{--prefix=@dots{}}, as
 described below.]
-@set configure-gcc 11
-sh[12]# @kbd{make bootstrap}
+@set configure-gcc 8
+sh[ 9]# @kbd{make bootstrap}
 [This takes a long time, and is where most problems occur.]
-@set build-gcc 12
-sh[13]# @kbd{make compare}
+@set build-gcc 9
+sh[10]# @kbd{make compare}
 [This verifies that the compiler is `sane'.
 If any files are printed, you have likely found a g77 bug.]
-@set compare-gcc 13
-sh[14]# @kbd{rm -fr stage1}
-@set rm-stage1 14
-sh[15]# @kbd{make -k install}
+@set compare-gcc 10
+sh[11]# @kbd{rm -fr stage1}
+@set rm-stage1 11
+sh[12]# @kbd{make -k install}
 [The actual installation.]
-@set install-g77 15
-sh[16]# @kbd{g77 -v}
+@set install-g77 12
+sh[13]# @kbd{g77 -v}
 [Verify that g77 is installed, obtain version info.]
-@set show-version 16
-sh[17]#
-@set end-procedure 17
+@set show-version 13
+sh[14]#
+@set end-procedure 14
 @end example
 
 @xref{Updating Documentation,,Updating Your Info Directory}, for
@@ -877,17 +942,17 @@ installed version of @code{g77} and @code{gcc} in any case.
 @c instead, or apply @file{gcc-2.7.2-2.7.2.1.diff.gz} to achieve
 @c similar results.
 
-@item Step @value{unpack-g77}: @kbd{gunzip -d < /usr/FSF/g77-0.5.21.tar.gz | tar xf -}
+@item Step @value{unpack-g77}: @kbd{gunzip -d < /usr/FSF/g77-@value{version-g77}.tar.gz | tar xf -}
 It is not always necessary to obtain the latest version of
 @code{g77} as a complete @file{.tar.gz} file if you have
 a complete, earlier distribution of @code{g77}.
 If appropriate, you can unpack that earlier
 version of @code{g77}, and then apply the appropriate patches
 to achieve the same result---a source tree containing version
-0.5.21 of @code{g77}.
+@value{version-g77} of @code{g77}.
 
-@item Step @value{link-gcc}: @kbd{ln -s gcc-2.7.2.3 gcc}
-@item Step @value{link-g77}: @kbd{ln -s g77-0.5.21 g77}
+@item Step @value{link-gcc}: @kbd{ln -s gcc-@value{version-gcc} gcc}
+@item Step @value{link-g77}: @kbd{ln -s g77-@value{version-g77} g77}
 These commands mainly help reduce typing,
 and help reduce visual clutter in examples
 in this manual showing what to type to install @code{g77}.
@@ -901,7 +966,7 @@ other than the FSF.
 
 @item Step @value{merge-g77}: @kbd{mv -i g77/* gcc}
 After doing this, you can, if you like, type
-@samp{rm g77} and @samp{rmdir g77-0.5.21} to remove
+@samp{rm g77} and @samp{rmdir g77-@value{version-g77}} to remove
 the empty directory and the symbol link to it.
 But, it might be helpful to leave them around as
 quick reminders of which version(s) of @code{g77} are
@@ -911,59 +976,25 @@ installed on your system.
 on the contents of the @file{g77} directory (as merged
 into the @file{gcc} directory).
 
-@item Step @value{apply-patch}: @kbd{patch -p1 @dots{}}
-@c (Or `@kbd{@dots{} < gcc/f/gbe/2.7.2.1.diff}', if appropriate.)
-@c
-This can produce a wide variety of printed output,
-from @samp{Hmm, I can't seem to find a patch in there anywhere...}
-to long lists of messages indicated that patches are
-being found, applied successfully, and so on.
-
-If messages about ``fuzz'', ``offset'', or
-especially ``reject files'' are printed, it might
-mean you applied the wrong patch file.
-If you believe this is the case, it is best to restart
-the sequence after deleting (or at least renaming to unused
-names) the top-level directories for @code{g77} and @code{gcc}
-and their symbolic links.
-
-After this command finishes, the @code{gcc} directory might
-have old versions of several files as saved by @code{patch}.
-To remove these, after @kbd{cd gcc}, type @kbd{rm -i *.~*~}.
-
-@xref{Merging Distributions}, for more information.
-
-@item Step @value{f77-install-ok}: @kbd{touch f77-install-ok}
-Don't do this if you don't want to overwrite an existing
-version of @code{f77} (such as a native compiler, or a
-script that invokes @code{f2c}).
-Otherwise, installation will overwrite the @code{f77} command
-and the @code{f77} man pages with copies of the corresponding
-@code{g77} material.
-
-@xref{Installing f77,,Installing @code{f77}}, for more
-information.
-
-@item Step @value{f2c-install-ok}: @kbd{touch f2c-install-ok}
-Don't do this if you don't want to overwrite an existing
-installation of @code{libf2c} (though, chances are, you do).
-Instead, @kbd{touch f2c-exists-ok} to allow the installation
-to continue without any error messages about @file{/usr/lib/libf2c.a}
-already existing.
-
-@xref{Installing f2c,,Installing @code{f2c}}, for more
-information.
-
 @item Step @value{configure-gcc}: @kbd{./configure --prefix=/usr}
-This is where you specify that the @file{g77} executable is to be
-installed in @file{/usr/bin/}, the @file{libf2c.a} library is
-to be installed in @file{/usr/lib/}, and so on.
+This is where you specify that
+the @file{g77} and @file{gcc} executables are to be
+installed in @file{/usr/bin/},
+the @code{g77} and @code{gcc} documentation is
+to be installed in @file{/usr/info/} and @file{/usr/man/},
+and so on.
 
 You should ensure that any existing installation of the @file{gcc}
 executable is in @file{/usr/bin/}.
-Otherwise, installing @code{g77} so that it does not fully
-replace the existing installation of @code{gcc} is likely
-to result in the inability to compile Fortran programs.
+
+However, if that existing version of @code{gcc} is not @value{version-gcc},
+or if you simply wish to avoid risking overwriting it with a
+newly built copy of the same version,
+you can specify @samp{--prefix=/usr/local}
+(which is the default)
+or some other path,
+and invoke the newly installed version
+directly from that path's @file{bin} directory.
 
 @xref{Where to Install,,Where in the World Does Fortran (and GNU CC) Go?},
 for more information on determining where to install @code{g77}.
@@ -996,9 +1027,11 @@ You don't need to do this, but it frees up disk space.
 If this doesn't seem to work, try:
 
 @example
-make -k install install-libf77 install-f2c-all
+make -k install install-libf77
 @end example
 
+Or, make sure you're using GNU @code{make}.
+
 @xref{Installation of Binaries}, for more information.
 
 @xref{Updating Documentation,,Updating Your Info Directory},
@@ -1047,6 +1080,15 @@ sh# @kbd{./smtest}
 sh#
 @end example
 
+If invoking @code{g77} doesn't seem to work,
+the problem might be that you've installed it in
+a location that is not in your shell's search path.
+For example, if you specified @samp{--prefix=/gnu},
+and @file{/gnu/bin} is not in your @code{PATH}
+environment variable,
+you must explicitly specify the location of the compiler
+via @kbd{/gnu/bin/g77 -o smtest smtest.f}.
+
 After proper installation, you don't
 need to keep your gcc and g77 source and build directories
 around anymore.
@@ -1056,23 +1098,22 @@ Removing them can free up a lot of disk space.
 @node Complete Installation
 @section Complete Installation
 
+For @code{egcs} users, the following information is
+mostly superceded by the @code{egcs} installation instructions.
+
 Here is the complete @code{g77}-specific information on how
 to configure, build, and install @code{g77}.
 
 @menu
 * Unpacking::
 * Merging Distributions::
-* f77: Installing f77.
-* f2c: Installing f2c.
-* Patching GNU Fortran::
 * Where to Install::
 * Configuring gcc::
 * Building gcc::
 * Pre-installation Checks::
 * Installation of Binaries::
 * Updating Documentation::
-* bison: Missing bison?.
-* makeinfo: Missing makeinfo?.
+* Missing tools?::
 @end menu
 
 @node Unpacking
@@ -1109,10 +1150,10 @@ and @code{g77} is:
 
 @example
 sh# @kbd{cd /usr/src}
-sh# @kbd{gunzip -c /usr/FSF/gcc-2.7.2.3.tar.gz | tar xf -}
-sh# @kbd{gunzip -c /usr/FSF/g77-0.5.21.tar.gz | tar xf -}
-sh# @kbd{ln -s gcc-2.7.2.3 gcc}
-sh# @kbd{ln -s g77-0.5.21 g77}
+sh# @kbd{gunzip -c /usr/FSF/gcc-@value{version-gcc}.tar.gz | tar xf -}
+sh# @kbd{gunzip -c /usr/FSF/g77-@value{version-g77}.tar.gz | tar xf -}
+sh# @kbd{ln -s gcc-@value{version-gcc} gcc}
+sh# @kbd{ln -s g77-@value{version-g77} g77}
 sh# @kbd{mv -i g77/* gcc}
 @end example
 
@@ -1137,7 +1178,7 @@ g77/f
 
 All three entries should be moved (or copied) into a @code{gcc}
 source tree (typically named after its version number and
-as it appears in the FSF distributions---e.g. @file{gcc-2.7.2.3}).
+as it appears in the FSF distributions---e.g. @file{gcc-@value{version-gcc}}).
 
 @file{g77/f} is the subdirectory containing all of the
 code, documentation, and other information that is specific
@@ -1157,8 +1198,7 @@ tree for the first time.
 @cindex optimizations, Pentium
 @emph{Note:} Please use @strong{only} @code{gcc} and @code{g77}
 source trees as distributed by the FSF.
-Use of modified versions, such as the Pentium-specific-optimization
-port of @code{gcc}, is likely to result in problems that appear to be
+Use of modified versions is likely to result in problems that appear to be
 in the @code{g77} code but, in fact, are not.
 Do not use such modified versions
 unless you understand all the differences between them and the versions
@@ -1173,29 +1213,24 @@ and @code{gcc} can coexist as they do in the stock FSF distributions.
 @cindex versions of @code{gcc}
 @cindex support for @code{gcc} versions
 
-After merging the @code{g77} source tree into the @code{gcc}
-source tree, the final merge step is done by applying the
-pertinent patches the @code{g77} distribution provides for
-the @code{gcc} source tree.
-
-Read the file @file{gcc/f/gbe/README}, and apply the appropriate
-patch file for the version of the GNU CC compiler you have, if
-that exists.
-If the directory exists but the appropriate file
-does not exist, you are using either an old, unsupported version,
-or a release one that is newer than the newest @code{gcc} version
-supported by the version of @code{g77} you have.
+After merging the @code{g77} source tree into the @code{gcc} source tree,
+you have put together a complete @code{g77} source tree.
 
 @cindex gcc version numbering
 @cindex version numbering
 @cindex g77 version number
 @cindex GNU version numbering
-As of version 0.5.18, @code{g77} modifies the version number
-of @code{gcc} via the pertinent patches.
-This is done because the resulting version of @code{gcc} is
-deemed sufficiently different from the vanilla distribution
-to make it worthwhile to present, to the user, information
-signaling the fact that there are some differences.
+As of version 0.5.23, @code{g77} no longer modifies
+the version number of @code{gcc},
+nor does it patch @code{gcc} itself.
+
+@code{g77} still depends on being merged with an
+appropriate version of @code{gcc}.
+For version @value{version-g77} of @code{g77},
+the specific version of @code{gcc} supported is @value{version-gcc}.
+
+However, other versions of @code{gcc} might be suitable
+``hosts'' for this version of @code{g77}.
 
 GNU version numbers make it easy to figure out whether a
 particular version of a distribution is newer or older than
@@ -1204,7 +1239,7 @@ The format is,
 generally, @var{major}.@var{minor}.@var{patch}, with
 each field being a decimal number.
 (You can safely ignore
-leading zeros; for example, 1.5.3 is the same as 1.5.03.)
+leading zeros; for example, 1.5.3 is the same as 1.5.03.)
 The @var{major} field only increases with time.
 The other two fields are reset to 0 when the field to
 their left is incremented; otherwise, they, too, only
@@ -1216,9 +1251,10 @@ announcements and in names for distributions and
 the directories they create.)
 
 If your version of @code{gcc} is older than the oldest version
-supported by @code{g77} (as casually determined by listing
-the contents of @file{gcc/f/gbe/}), you should obtain a newer,
-supported version of @code{gcc}.
+supported by @code{g77}
+(as casually determined by listing the contents of @file{gcc/f/INSTALL/},
+which contains these installation instructions in plain-text format),
+you should obtain a newer, supported version of @code{gcc}.
 (You could instead obtain an older version of @code{g77},
 or try and get your @code{g77} to work with the old
 @code{gcc}, but neither approach is recommended, and
@@ -1230,20 +1266,18 @@ If your version of @code{gcc} is newer than the newest version
 supported by @code{g77}, it is possible that your @code{g77}
 will work with it anyway.
 If the version number for @code{gcc} differs only in the
-@var{patch} field, you might as well try applying the @code{g77} patch
-that is for the newest version of @code{gcc} having the same
-@var{major} and @var{minor} fields, as this is likely to work.
+@var{patch} field, you might as well try that version of @code{gcc}.
+Since it has the same @var{major} and @var{minor} fields,
+the resulting combination is likely to work.
 
 So, for example, if a particular version of @code{g77} has support for
-@code{gcc} versions 2.7.0 and 2.7.1,
-it is likely that @file{gcc-2.7.2} would work well with @code{g77}
-by using the @file{2.7.1.diff} patch file provided
-with @code{g77} (aside from some offsets reported by @code{patch},
-which usually are harmless).
-
-However, @file{gcc-2.8.0} would almost certainly
-not work with that version of @code{g77} no matter which patch file was
-used, so a new version of @code{g77} would be needed (and you should
+@code{gcc} versions 2.8.0 and 2.8.1,
+it is likely that @file{gcc-2.8.2} would work well with @code{g77}.
+
+However, @file{gcc-2.9.0} would almost certainly
+not work with that version of @code{g77}
+without appropriate modifications,
+so a new version of @code{g77} would be needed (and you should
 wait for it rather than bothering the maintainers---@pxref{Changes,,
 User-Visible Changes}).
 
@@ -1255,211 +1289,24 @@ separate distributions.
 By keeping them separate, each product is able to be independently
 improved and distributed to its user base more frequently.
 
-However, @code{g77} often requires changes to contemporary
-versions of @code{gcc}.
-Also, the GBE interface defined by @code{gcc} typically
+However, the GBE interface defined by @code{gcc} typically
 undergoes some incompatible changes at least every time the
 @var{minor} field of the version number is incremented,
 and such changes require corresponding changes to
 the @code{g77} front end (FFE).
 
-It is hoped that the GBE interface, and the @code{gcc} and
-@code{g77} products in general, will stabilize sufficiently
-for the need for hand-patching to disappear.
-
-Invoking @code{patch} as described in @file{gcc/f/gbe/README}
-can produce a wide variety of printed output,
-from @samp{Hmm, I can't seem to find a patch in there anywhere...}
-to long lists of messages indicated that patches are
-being found, applied successfully, and so on.
-
-If messages about ``fuzz'', ``offset'', or
-especially ``reject files'' are printed, it might
-mean you applied the wrong patch file.
-If you believe this is the case, it is best to restart
-the sequence after deleting (or at least renaming to unused
-names) the top-level directories for @code{g77} and @code{gcc}
-and their symbolic links.
-That is because @code{patch} might have partially patched
-some @code{gcc} source files, so reapplying the correct
-patch file might result in the correct patches being
-applied incorrectly (due to the way @code{patch} necessarily
-works).
-
-After @code{patch} finishes, the @code{gcc} directory might
-have old versions of several files as saved by @code{patch}.
-To remove these, after @kbd{cd gcc}, type @kbd{rm -i *.~*~}.
-
-@pindex config-lang.in
-@emph{Note:} @code{g77}'s configuration file @file{gcc/f/config-lang.in}
-ensures that the source code for the version of @code{gcc}
-being configured has at least one indication of being patched
-as required specifically by @code{g77}.
-This configuration-time
-checking should catch failure to apply the correct patch and,
-if so caught, should abort the configuration with an explanation.
-@emph{Please} do not try to disable the check,
-otherwise @code{g77} might well appear to build
-and install correctly, and even appear to compile correctly,
-but could easily produce broken code.
-
-@cindex creating patch files
-@cindex patch files, creating
-@pindex gcc/f/gbe/
-@samp{diff -rcp2N} is used to create the patch files
-in @file{gcc/f/gbe/}.
-
-@node Installing f77
-@subsection Installing @code{f77}
-@cindex f77 command
-@cindex commands, f77
-@cindex native compiler
-
-You should decide whether you want installation of @code{g77}
-to also install an @code{f77} command.
-On systems with a native @code{f77}, this is not
-normally desired, so @code{g77} does not do this by
-default.
-
-@pindex f77-install-ok
-@vindex F77_INSTALL_FLAG
-If you want @code{f77} installed, create the file @file{f77-install-ok}
-(e.g. via the UNIX command @samp{touch f77-install-ok}) in the
-source or build top-level directory (the same directory in
-which the @code{g77} @file{f} directory resides, not the @file{f} directory
-itself), or edit @file{gcc/f/Make-lang.in} and change the definition
-of the @samp{F77_INSTALL_FLAG} macro appropriately.
-
-Usually, this means that, after typing @samp{cd gcc}, you
-would type @samp{touch f77-install-ok}.
-
-When you enable installation of @code{f77}, either a link to or a
-direct copy of the @code{g77} command is made.
-Similarly, @file{f77.1} is installed as a man page.
-
-(The @code{uninstall} target in the @file{gcc/Makefile} also tests
-this macro and file, when invoked, to determine whether to delete the
-installed copies of @code{f77} and @file{f77.1}.)
-
-@emph{Note:} No attempt is yet made
-to install a program (like a shell script) that provides
-compatibility with any other @code{f77} programs.
-Only the most rudimentary invocations of @code{f77} will
-work the same way with @code{g77}.
-
-@node Installing f2c
-@subsection Installing @code{f2c}
-
-Currently, @code{g77} does not include @code{f2c} itself in its
-distribution.
-However, it does include a modified version of the @code{libf2c}.
-This version is normally compatible with @code{f2c}, but has been
-modified to meet the needs of @code{g77} in ways that might possibly
-be incompatible with some versions or configurations of @code{f2c}.
-
-Decide how installation of @code{g77} should affect any existing installation
-of @code{f2c} on your system.
-
-@pindex f2c
-@pindex f2c.h
-@pindex libf2c.a
-@pindex libF77.a
-@pindex libI77.a
-If you do not have @code{f2c} on your system (e.g. no @file{/usr/bin/f2c},
-no @file{/usr/include/f2c.h}, and no @file{/usr/lib/libf2c.a},
-@file{/usr/lib/libF77.a}, or @file{/usr/lib/libI77.a}), you don't need to
-be concerned with this item.
-
-If you do have @code{f2c} on your system, you need to decide how users
-of @code{f2c} will be affected by your installing @code{g77}.
-Since @code{g77} is
-currently designed to be object-code-compatible with @code{f2c} (with
-very few, clear exceptions), users of @code{f2c} might want to combine
-@code{f2c}-compiled object files with @code{g77}-compiled object files in a
-single executable.
-
-To do this, users of @code{f2c} should use the same copies of @file{f2c.h} and
-@file{libf2c.a} that @code{g77} uses (and that get built as part of
-@code{g77}).
-
-If you do nothing here, the @code{g77} installation process will not
-overwrite the @file{include/f2c.h} and @file{lib/libf2c.a} files with its
-own versions, and in fact will not even install @file{libf2c.a} for use
-with the newly installed versions of @code{gcc} and @code{g77} if it sees
-that @file{lib/libf2c.a} exists---instead, it will print an explanatory
-message and skip this part of the installation.
-
-@pindex f2c-install-ok
-@vindex F2C_INSTALL_FLAG
-To install @code{g77}'s versions of @file{f2c.h} and @file{libf2c.a}
-in the appropriate
-places, create the file @file{f2c-install-ok} (e.g. via the UNIX
-command @samp{touch f2c-install-ok}) in the source or build top-level
-directory (the same directory in which the @code{g77} @file{f} directory
-resides, not the @file{f} directory itself), or edit @file{gcc/f/Make-lang.in}
-and change the definition of the @samp{F2C_INSTALL_FLAG} macro appropriately.
-
-Usually, this means that, after typing @samp{cd gcc}, you
-would type @samp{touch f2c-install-ok}.
-
-Make sure that when you enable the overwriting of @file{f2c.h}
-and @file{libf2c.a}
-as used by @code{f2c}, you have a recent and properly configured version of
-@file{bin/f2c} so that it generates code that is compatible with @code{g77}.
-
-@pindex f2c-exists-ok
-@vindex F2CLIBOK
-If you don't want installation of @code{g77} to overwrite @code{f2c}'s existing
-installation, but you do want @code{g77} installation to proceed with
-installation of its own versions of @file{f2c.h} and @file{libf2c.a} in places
-where @code{g77} will pick them up (even when linking @code{f2c}-compiled
-object files---which might lead to incompatibilities), create
-the file @file{f2c-exists-ok} (e.g. via the UNIX command
-@samp{touch f2c-exists-ok}) in the source or build top-level directory,
-or edit @file{gcc/f/Make-lang.in} and change the definition of the
-@samp{F2CLIBOK} macro appropriately.
-
-@node Patching GNU Fortran
-@subsection Patching GNU Fortran
-
-If you're using a SunOS4 system, you'll need to make the following
-change to @file{gcc/f/proj.h}: edit the line reading
-
-@example
-#define FFEPROJ_STRTOUL 1  @dots{}
-@end example
-
-@noindent
-by replacing the @samp{1} with @samp{0}.
-Or, you can avoid editing the source by adding
-@example
-CFLAGS='-DFFEPROJ_STRTOUL=0 -g -O'
-@end example
-to the command line for @code{make} when you invoke it.
-(@samp{-g} is the default for @samp{CFLAGS}.)
-
-This causes a minimal version of @code{strtoul()} provided
-as part of the @code{g77} distribution to be compiled and
-linked into whatever @code{g77} programs need it, since
-some systems (like SunOS4 with only the bundled compiler and its
-runtime) do not provide this function in their system libraries.
-
-Similarly, a minimal version of @code{bsearch()} is available
-and can be enabled by editing a line similar to the one
-for @code{strtoul()} above in @file{gcc/f/proj.h}, if
-your system libraries lack @code{bsearch()}.
-The method of overriding @samp{X_CFLAGS} may also be used.
-
-These are not problems with @code{g77}, which requires an
-ANSI C environment.
-You should upgrade your system to one that provides
-a full ANSI C environment, or encourage the maintainers
-of @code{gcc} to provide one to all @code{gcc}-based
-compilers in future @code{gcc} distributions.
-
-@xref{Problems Installing}, for more information on
-why @code{strtoul()} comes up missing and on approaches
-to dealing with this problem that have already been tried.
+@c @pindex config-lang.in
+@c @emph{Note:} @code{g77}'s configuration file @file{gcc/f/config-lang.in}
+@c sometimes ensures that the source code for the version of @code{gcc}
+@c being configured has at least one indication of being an appropriate
+@c version as required specifically by @code{g77}.
+@c This configuration-time
+@c checking should catch failures to use the proper version of @code{gcc} and,
+@c if so caught, should abort the configuration with an explanation.
+@c @emph{Please} do not try to disable this check,
+@c otherwise @code{g77} might well appear to build
+@c and install correctly, and even appear to compile correctly,
+@c but could easily produce broken code.
 
 @node Where to Install
 @subsection Where in the World Does Fortran (and GNU CC) Go?
@@ -1472,8 +1319,8 @@ binaries to be installed after they're built,
 because this information is given to the configuration
 tool and used during the build itself.
 
-A @code{g77} installation necessarily requires installation of
-a @code{g77}-aware version of @code{gcc}, so that the @code{gcc}
+A @code{g77} installation normally includes installation of
+a Fortran-aware version of @code{gcc}, so that the @code{gcc}
 command recognizes Fortran source files and knows how to compile
 them.
 
@@ -1484,10 +1331,11 @@ version of @code{gcc} on the system.
 Sometimes people make the mistake of installing @code{gcc} as
 @file{/usr/local/bin/gcc},
 leaving an older, non-Fortran-aware version in @file{/usr/bin/gcc}.
-(Or, the opposite happens.)@ 
-This can result in @code{g77} being unable to compile Fortran
-source files, because when it calls on @code{gcc} to do the
-actual compilation, @code{gcc} complains that it does not
+(Or, the opposite happens.)
+This can result in @code{gcc} being unable to compile Fortran
+source files,
+because when the older version of @code{gcc} is invoked,
+it complains that it does not
 recognize the language, or the file name suffix.
 
 So, determine whether @code{gcc} already is installed on your system,
@@ -1495,12 +1343,17 @@ and, if so, @emph{where} it is installed, and prepare to configure the
 new version of @code{gcc} you'll be building so that it installs
 over the existing version of @code{gcc}.
 
-You might want to back up your existing copy of @file{bin/gcc}, and
-the entire @file{lib/} directory, before
+You might want to back up your existing copy of @file{/usr/bin/gcc}, and
+the entire @file{/usr/lib} directory, before
 you perform the actual installation (as described in this manual).
 
 Existing @code{gcc} installations typically are
 found in @file{/usr} or @file{/usr/local}.
+(This means the commands are installed in @file{/usr/bin} or
+@file{/usr/local/bin},
+the libraries in @file{/usr/lib} or @file{/usr/local/lib},
+and so on.)
+
 If you aren't certain where the currently
 installed version of @code{gcc} and its
 related programs reside, look at the output
@@ -1528,7 +1381,9 @@ a good idea.
 though in this case it is intentional that @code{g77} overwrites
 @code{gcc} if it is already installed---it is unusual that
 the installation process for one distribution intentionally
-overwrites a program or file installed by another distribution.)
+overwrites a program or file installed by another distribution,
+although, in this case, @code{g77} is an augmentation of the
+@code{gcc} distribution.)
 
 Another reason to back up the existing version first,
 or make sure you can restore it easily, is that it might be
@@ -1549,14 +1404,14 @@ option of @code{gcc}.
 @code{gcc}.
 There are two parts of @code{g77} that are configured in two
 different ways---@code{g77}, which ``camps on'' to the
-@code{gcc} configuration mechanism, and @code{libf2c}, which
+@code{gcc} configuration mechanism, and @code{libg2c}, which
 uses a variation of the GNU @code{autoconf} configuration
 system.
 
 Generally, you shouldn't have to be concerned with
-either @code{g77} or @code{libf2c} configuration, unless
+either @code{g77} or @code{libg2c} configuration, unless
 you're configuring @code{g77} as a cross-compiler.
-In this case, the @code{libf2c} configuration, and possibly the
+In this case, the @code{libg2c} configuration, and possibly the
 @code{g77} and @code{gcc} configurations as well,
 might need special attention.
 (This also might be the case if you're porting @code{gcc} to
@@ -1570,22 +1425,31 @@ Pay special attention to the @samp{--prefix=} option, which
 you almost certainly will need to specify.
 
 (Note that @code{gcc} installation information is provided
-as a straight text file in @file{gcc/INSTALL}.)
+as a plain-text file in @file{gcc/INSTALL}.)
 
 The information printed by the invocation of @file{./configure}
 should show that the @file{f} directory (the Fortran language)
 has been configured.
 If it does not, there is a problem.
 
-@emph{Note:} Configuring with the @samp{--srcdir} argument is known
-to work with GNU @code{make}, but it is not known to work with
-other variants of @code{make}.
+@emph{Note:} Configuring with the @samp{--srcdir} argument,
+or by starting in an empty directory
+and typing a command such as @kbd{../gcc/configure} to
+build with separate build and source directories,
+is known to work with GNU @code{make},
+but it is known to not work with other variants of @code{make}.
 Irix5.2 and SunOS4.1 versions of @code{make} definitely
 won't work outside the source directory at present.
-@code{g77}'s
-portion of the @file{configure} script issues a warning message
-about this when you configure for building binaries outside
-the source directory.
+
+@code{g77}'s portion of the @file{configure} script
+used to issue a warning message about this
+when configuring for building binaries outside the source directory,
+but no longer does this as of version 0.5.23.
+
+Instead, @code{g77} simply rejects most common attempts
+to build it using a non-GNU @code{make} when the
+build directory is not the same as the source directory,
+issuing an explanatory diagnostic.
 
 @node Building gcc
 @subsection Building GNU CC
@@ -1604,14 +1468,14 @@ removing @samp{c} or @samp{f77} from the definition of the
 @samp{LANGUAGES} macro.
 
 After configuring @code{gcc}, which configures @code{g77} and
-@code{libf2c} automatically, you're ready to start the actual
+@code{libg2c} automatically, you're ready to start the actual
 build by invoking @code{make}.
 
 @pindex configure
-@emph{Note:} You @strong{must} have run @file{./configure}
-before you run @code{make}, even if you're
-using an already existing @code{gcc} development directory, because
-@file{./configure} does the work to recognize that you've added
+@emph{Note:} You @strong{must} have run the @file{configure}
+script in @code{gcc} before you run @code{make},
+even if you're using an already existing @code{gcc} development directory,
+because @file{./configure} does the work to recognize that you've added
 @code{g77} to the configuration.
 
 There are two general approaches to building GNU CC from
@@ -1707,13 +1571,6 @@ command:
 make -k CC=gcc
 @end example
 
-(The @samp{g77} target is necessary because the @code{gcc}
-build procedures apparently do not automatically build
-command drivers for languages in subdirectories.
-It's the @samp{all} target that triggers building
-everything except, apparently, the @code{g77} command
-itself.)
-
 If you run into problems using this method, you have
 two options:
 
@@ -1734,6 +1591,7 @@ However, understand that many problems preventing a
 straight build from working are not @code{g77} problems,
 and, in such cases, are not likely to be addressed in
 future versions of @code{g77}.
+Consider treating them as @code{gcc} bugs instead.
 
 @node Pre-installation Checks
 @subsection Pre-installation Checks
@@ -1749,52 +1607,51 @@ printed by them when they work:
 
 @example
 sh# @kbd{cd /usr/src/gcc}
-sh# @kbd{./g77 --driver=./xgcc -B./ -v}
-g77 version 0.5.21
- ./xgcc -B./ -v -fnull-version -o /tmp/gfa18047 @dots{}
+sh# @kbd{./g77 -B./ -v}
+g77 version @value{version-g77}
+Driving: ./g77 -B./ -v -c -xf77-version /dev/null -xnone
 Reading specs from ./specs
-gcc version 2.7.2.3.f.1
./cpp -lang-c -v -isystem ./include -undef @dots{}
-GNU CPP version 2.7.2.3.f.1 (Linux/Alpha)
+gcc version @value{version-gcc}
cpp -lang-c -v -isystem ./include -undef -D__GNUC__=2 @dots{}
+GNU CPP version @value{version-gcc} (Alpha GNU/Linux with ELF)
 #include "..." search starts here:
 #include <...> search starts here:
- ./include
- /usr/local/include
- /usr/alpha-unknown-linux/include
- /usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.3.f.1/include
+ include
+ /usr/alpha-linux/include
+ /usr/lib/gcc-lib/alpha-linux/@value{version-gcc}/include
  /usr/include
 End of search list.
- ./f771 /tmp/cca18048.i -fset-g77-defaults -quiet -dumpbase @dots{}
-GNU F77 version 2.7.2.3.f.1 (Linux/Alpha) compiled @dots{}
-GNU Fortran Front End version 0.5.21 compiled: @dots{}
- as -nocpp -o /tmp/cca180481.o /tmp/cca18048.s
- ld -G 8 -O1 -o /tmp/gfa18047 /usr/lib/crt0.o -L. @dots{}
-__G77_LIBF77_VERSION__: 0.5.21
-@@(#)LIBF77 VERSION 19970404
-__G77_LIBI77_VERSION__: 0.5.21
-@@(#) LIBI77 VERSION pjw,dmg-mods 19970816
-__G77_LIBU77_VERSION__: 0.5.21
-@@(#) LIBU77 VERSION 19970609
+ ./f771 -fnull-version -quiet -dumpbase g77-version.f -version @dots{}
+GNU F77 version @value{version-gcc} (alpha-linux) compiled @dots{}
+GNU Fortran Front End version @value{version-g77}
+ as -nocpp -o /tmp/cca14485.o /tmp/cca14485.s
+ ld -m elf64alpha -G 8 -O1 -dynamic-linker /lib/ld-linux.so.2 @dots{}
+ /tmp/cca14485
+__G77_LIBF77_VERSION__: @value{version-g77}
+@@(#)LIBF77 VERSION 19970919
+__G77_LIBI77_VERSION__: @value{version-g77}
+@@(#) LIBI77 VERSION pjw,dmg-mods 19980405
+__G77_LIBU77_VERSION__: @value{version-g77}
+@@(#) LIBU77 VERSION 19970919
 sh# @kbd{./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone}
 Reading specs from ./specs
-gcc version 2.7.2.3.f.1
+gcc version @value{version-gcc}
  ./cpp -lang-c -v -isystem ./include -undef @dots{}
-GNU CPP version 2.7.2.3.f.1 (Linux/Alpha)
+GNU CPP version @value{version-gcc} (Alpha GNU/Linux with ELF)
 #include "..." search starts here:
 #include <...> search starts here:
- ./include
- /usr/local/include
- /usr/alpha-unknown-linux/include
- /usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.3.f.1/include
+ include
+ /usr/alpha-linux/include
+ /usr/lib/gcc-lib/alpha-linux/@value{version-gcc}/include
  /usr/include
 End of search list.
  ./cc1 /tmp/cca18063.i -quiet -dumpbase null.c -version @dots{}
-GNU C version 2.7.2.3.f.1 (Linux/Alpha) compiled @dots{}
+GNU C version @value{version-gcc} (alpha-linux) compiled @dots{}
  as -nocpp -o /tmp/cca180631.o /tmp/cca18063.s
- ld -G 8 -O1 -o /tmp/delete-me /usr/lib/crt0.o -L. @dots{}
-/usr/lib/crt0.o: In function `__start':
-crt0.S:110: undefined reference to `main'
-/usr/lib/crt0.o(.lita+0x28): undefined reference to `main'
+ ld -m elf64alpha -G 8 -O1 -dynamic-linker /lib/ld-linux.so.2 @dots{}
+/usr/lib/crt1.o: In function `_start':
+../sysdeps/alpha/elf/start.S:77: undefined reference to `main'
+../sysdeps/alpha/elf/start.S:77: undefined reference to `main'
 sh#
 @end example
 
@@ -1823,7 +1680,7 @@ and @code{g77}, use the following commands to invoke them.
 To invoke @code{g77}, type:
 
 @example
-/usr/src/gcc/g77 --driver=/usr/src/gcc/xgcc -B/usr/src/gcc/ @dots{}
+/usr/src/gcc/g77 -B/usr/src/gcc/ @dots{}
 @end example
 
 To invoke @code{gcc}, type:
@@ -1858,11 +1715,11 @@ supply the same definitions you used when building
 the final stage) or if you deviated from the
 instructions for a straight build.
 
-If the above command does not install @file{libf2c.a}
+If the above command does not install @file{libg2c.a}
 as expected, try this:
 
 @example
-make -k @dots{} install install-libf77 install-f2c-all
+make -k @dots{} install install-libf77
 @end example
 
 We don't know why some non-GNU versions of @code{make} sometimes
@@ -1875,6 +1732,16 @@ continue after some installation problems, like not having
 @code{makeinfo} installed on your system.
 It might not be necessary for your system.
 
+@emph{Note:} @code{g77} no longer installs
+files not directly part of @code{g77},
+such as @file{/usr/bin/f77}, @file{/usr/lib/libf2c.a},
+and @file{/usr/include/f2c.h}, or their
+@file{/usr/local} equivalents.
+
+@xref{Distributing Binaries}, for information on
+how to accommodate systems with no existing non-@code{g77}
+@code{f77} compiler and systems with @code{f2c} installed.
+
 @node Updating Documentation
 @subsection Updating Your Info Directory
 @cindex updating info directory
@@ -1887,86 +1754,211 @@ It might not be necessary for your system.
 
 As part of installing @code{g77}, you should make sure users
 of @code{info} can easily access this manual on-line.
-Do this by making sure a line such as the following exists
-in @file{/usr/info/dir}, or in whatever file is the top-level
-file in the @code{info} directory on your system (perhaps
-@file{/usr/local/info/dir}:
 
-@example
-* g77: (g77).           The GNU Fortran programming language.
-@end example
-
-If the menu in @file{dir} is organized into sections, @code{g77}
-probably belongs in a section with a name such as one of
-the following:
+@code{g77} does this automatically by
+invoking the @code{install-info} command
+when you use @samp{make install} to install @code{g77}.
+
+If that fails, or if the @code{info} directory
+it updates is not the one normally accessed by users,
+consider invoking it yourself.
+For example:
+
+@smallexample
+install-info --info-dir=/usr/info /usr/info/g77.info
+@end smallexample
+
+The above example assumes the @code{g77} documentation
+already is installed in @file{/usr/info}
+and that @file{/usr/info/dir} is the file
+you wish to update.
+Adjust the command accordingly,
+if those assumptions are wrong.
+
+@node Missing tools?
+@subsection Missing tools?
+@cindex command missing
+@cindex command not found
+@cindex file not found
+@cindex not found
+
+A build of @code{gcc} might fail due to one or more tools
+being called upon by @code{make}
+(during the build or install process),
+when those tools are not installed on your system.
+
+This situation can result from any of the following actions
+(performed by you or someone else):
 
 @itemize @bullet
 @item
-Fortran Programming
+Changing the source code or documentation yourself
+(as a developer or technical writer).
 
 @item
-Writing Programs
+Applying a patch that changes the source code or documentation
+(including, sometimes, the official patches distributed by
+the FSF).
 
 @item
-Programming Languages
+Deleting the files that are created by the (missing) tools.
 
-@item
-Languages Other Than C
+The @samp{make maintainer-clean} command is supposed
+to delete these files, so invoking this command without
+having all the appropriate tools installed is not recommended.
 
 @item
-Scientific/Engineering Tools
+Creating the source directory using a method that
+does not preserve the date-time-modified information
+in the original distribution.
 
-@item
-GNU Compilers
+For example, the UNIX @samp{cp -r} command copies a
+directory tree without preserving the date-time-modified
+information.
+Use @samp{cp -pr} instead.
 @end itemize
 
+The reason these activities cause @code{make} to try and
+invoke tools that it probably wouldn't when building
+from a perfectly ``clean'' source directory containing
+@code{gcc} and @code{g77} is that some files in the
+source directory (and the corresponding distribution)
+aren't really source files, but @emph{derived} files
+that are produced by running tools with the corresponding
+source files as input.
+These derived files @dfn{depend}, in @code{make} terminology,
+on the corresponding source files.
+
+@code{make} determines that a file that depends on another
+needs to be updated if the date-time-modified information for
+the source file shows that it is newer than the corresponding
+information for the derived file.
+
+If it makes that determination, @code{make} runs the appropriate
+commands (specified in the ``Makefile'') to update the
+derived file, and this process typically calls upon one or
+more installed tools to do the work.
+
+The ``safest'' approach to dealing with this situation
+is to recreate the @code{gcc} and @code{g77} source
+directories from complete @code{gcc} and @code{g77} distributions
+known to be provided by the FSF.
+
+Another fairly ``safe'' approach is to simply install
+the tools you need to complete the build process.
+This is especially appropriate if you've changed the
+source code or applied a patch to do so.
+
+However, if you're certain that the problem is limited
+entirely to incorrect date-time-modified information,
+that there are no discrepancies between the contents of
+source files and files derived from them in the source
+directory, you can often update the date-time-modified
+information for the derived files to work around the
+problem of not having the appropriate tools installed.
+
+On UNIX systems, the simplest way to update the date-time-modified
+information of a file is to use the use the @samp{touch}
+command.
+
+How to use @samp{touch} to update the derived files
+updated by each of the tools is described below.
+@emph{Note:} New versions of @code{g77} might change the set of
+files it generates by invoking each of these tools.
+If you cannot figure
+out for yourself how to handle such a situation, try an
+older version of @code{g77} until you find someone who can
+(or until you obtain and install the relevant tools).
+
+@menu
+* autoconf: Missing autoconf?.
+* bison: Missing bison?.
+* gperf: Missing gperf?.
+* makeinfo: Missing makeinfo?.
+@end menu
+
+@node Missing autoconf?
+@subsubsection Missing @code{autoconf}?
+@cindex @code{autoconf}
+@cindex missing @code{autoconf}
+
+If you cannot install @code{autoconf}, make sure you have started
+with a @emph{fresh} distribution of @code{gcc} and @code{g77},
+do @emph{not} do @samp{make maintainer-clean}, and, to ensure that
+@code{autoconf} is not invoked by @code{make} during the build,
+type these commands:
+
+@example
+sh# @kbd{cd gcc/f/runtime}
+sh# @kbd{touch configure libU77/configure}
+sh# @kbd{cd ../../..}
+sh#
+@end example
+
 @node Missing bison?
-@subsection Missing @code{bison}?
+@subsubsection Missing @code{bison}?
 @cindex @code{bison}
 @cindex missing @code{bison}
 
 If you cannot install @code{bison}, make sure you have started
 with a @emph{fresh} distribution of @code{gcc}, do @emph{not}
-do @samp{make maintainer-clean} (in other versions of @code{gcc},
-this was called @samp{make realclean}), and, to ensure that
+do @samp{make maintainer-clean}, and, to ensure that
 @code{bison} is not invoked by @code{make} during the build,
 type these commands:
 
 @example
 sh# @kbd{cd gcc}
-sh# @kbd{touch c-parse.c c-parse.h cexp.c}
+sh# @kbd{touch bi-parser.c bi-parser.h c-parse.c c-parse.h cexp.c}
 sh# @kbd{touch cp/parse.c cp/parse.h objc-parse.c}
+sh# @kbd{cd ..}
 sh#
 @end example
 
-These commands update the date-time-modified information for
-all the files produced by the various invocations of @code{bison}
-in the current versions of @code{gcc}, so that @code{make} no
-longer believes it needs to update them.
-All of these files should already exist in a @code{gcc}
-distribution, but the application of patches to upgrade
-to a newer version can leave the modification information
-set such that the @code{bison} input files look more ``recent''
-than the corresponding output files.
-
-@emph{Note:} New versions of @code{gcc} might change the set of
-files it generates by invoking @code{bison}---if you cannot figure
-out for yourself how to handle such a situation, try an
-older version of @code{gcc} until you find someone who can
-(or until you obtain and install @code{bison}).
+@node Missing gperf?
+@subsubsection Missing @code{gperf}?
+@cindex @code{gperf}
+@cindex missing @code{gperf}
+
+If you cannot install @code{gperf}, make sure you have started
+with a @emph{fresh} distribution of @code{gcc}, do @emph{not}
+do @samp{make maintainer-clean}, and, to ensure that
+@code{gperf} is not invoked by @code{make} during the build,
+type these commands:
+
+@example
+sh# @kbd{cd gcc}
+sh# @kbd{touch c-gperf.h}
+sh# @kbd{cd ..}
+sh#
+@end example
 
 @node Missing makeinfo?
-@subsection Missing @code{makeinfo}?
+@subsubsection Missing @code{makeinfo}?
 @cindex @code{makeinfo}
 @cindex missing @code{makeinfo}
+@cindex @code{libg2c.a} not found
+@cindex missing @code{libg2c.a}
+
+If @code{makeinfo} is needed but unavailable
+when installing (via @code{make install}),
+some files, like @file{libg2c.a},
+might not be installed,
+because once @code{make} determines that it cannot
+invoke @code{makeinfo}, it cancels any further processing.
 
-If you cannot install @code{makeinfo}, either use the @code{-k} option when
-invoking make to specify any of the @samp{install} or related targets,
-or specify @samp{MAKEINFO=echo} on the @code{make} command line.
+If you cannot install @code{makeinfo}, an easy work-around is to
+specify @samp{MAKEINFO=true} on the @code{make} command line,
+or to specify the @samp{-k} option (@kbd{make -k install}).
 
-If you fail to do one of these things, some files, like @file{libf2c.a},
-might not be installed, because the failed attempt by @code{make} to
-invoke @code{makeinfo} causes it to cancel any further processing.
+Another approach is to force the relevant files to be up-to-date
+by typing these commands and then re-trying the installation step:
+
+@example
+sh# @kbd{cd gcc}
+sh# @kbd{touch f/g77.info f/BUGS f/INSTALL f/NEWS}
+sh# @kbd{cd ..}
+sh#
+@end example
 
 @node Distributing Binaries
 @section Distributing Binaries
@@ -1987,37 +1979,87 @@ where @code{g77} could be considered the native compiler for Fortran and
 in @file{/usr/bin} instead of @file{/usr/local/bin}.
 Specify the
 @samp{--prefix=/usr} option when running @file{./configure}.
-You might
-also want to set up the distribution so the @code{f77} command is a
-link to @code{g77}---just make an empty file named @file{f77-install-ok} in
-the source or build directory (the one in which the @file{f} directory
-resides, not the @file{f} directory itself) when you specify one of the
-@file{install} or @file{uninstall} targets in a @code{make} command.
-
-For a system that might already have @code{f2c} installed, you definitely
-will want to make another empty file (in the same directory) named
-either @file{f2c-exists-ok} or @file{f2c-install-ok}.
-Use the former if you
-don't want your distribution to overwrite @code{f2c}-related files in existing
-systems; use the latter if you want to improve the likelihood that
-users will be able to use both @code{f2c} and @code{g77} to compile code for a
-single program without encountering link-time or run-time
-incompatibilities.
-
-(Make sure you clearly document, in the ``advertising'' for
+
+You might also want to set up the distribution
+so the @file{f77} command is a link to @file{g77},
+although a script that accepts ``classic'' UNIX @code{f77}
+options and translates the command-line to the
+appropriate @code{g77} command line would be more appropriate.
+If you do this, @emph{please} also provide a ``man page'' in
+@file{man/man1/f77.1} describing the command.
+(A link to @file{man/man1/g77.1} is appropriate
+if @file{bin/f77} is a link to @file{bin/g77}.)
+
+For a system that might already have @code{f2c} installed,
+consider whether inter-operation with @code{g77} will be
+important to users of @code{f2c} on that system.
+If you want to improve the likelihood
+that users will be able to use both @code{f2c} and @code{g77}
+to compile code for a single program
+without encountering link-time or run-time incompatibilities,
+make sure that,
+whenever they intend to combine @code{f2c}-produced code
+with @code{g77}-produced code in an executable, they:
+
+@itemize @bullet
+@item
+Use the @file{lib/gcc-lib/@dots{}/include/g2c.h} file
+generated by the @code{g77} build
+in place of the @file{f2c.h} file
+that normally comes with @code{f2c}
+(or versions of @code{g77} prior to 0.5.23)
+when compiling @emph{all} of the @code{f2c}-produced C code
+
+@item
+Link to the @code{lib/gcc-lib/@dots{}/libg2c.a} library
+built by the @code{g77} build
+instead of the @file{libf2c.a} library
+that normally comes with @code{f2c}
+(or versions of @code{g77} prior to 0.5.23)
+@end itemize
+
+How you choose to effect the above depends on whether
+the existing installation of @code{f2c} must be
+maintained.
+
+In any case, it is important to try and ensure that
+the installation keeps working properly even after
+subsequent re-installation of @code{f2c},
+which probably involves overwriting
+@file{/usr/local/lib/libf2c.a} and
+@file{/usr/local/include/f2c.h},
+or similar.
+
+At least, copying @file{libg2c.a} and @file{g2c.h} into
+the appropriate ``public'' directories
+allows users to more easily select the version of
+@code{libf2c} they wish to use for a particular
+build.
+The names are changed by @code{g77} to make this
+coexistence easier to maintain;
+even if @code{f2c} is installed later,
+the @code{g77} files normally installed
+by its installation process aren't disturbed.
+Use of symbolic links from one set of files to
+another might result in problems after a subsequent
+reinstallation of either @code{f2c} or @code{g77},
+so be sure to alert users of your distribution
+accordingly.
+
+(Make sure you clearly document, in the description of
 your distribution, how installation of your distribution will
 affect existing installations of @code{gcc}, @code{f2c},
 @code{f77}, @file{libf2c.a}, and so on.
 Similarly, you should clearly document any requirements
-you assume are met by users of your distribution.)
+you assume will be met by users of your distribution.)
 
 For other systems with native @code{f77} (and @code{cc}) compilers,
 configure @code{g77} as you (or most of your audience) would
 configure @code{gcc} for their installations.
-Typically this is for installation in
-@file{/usr/local}, and would not include a copy of
-@code{g77} named @code{f77}, so
-users could still use the native @code{f77}.
+Typically this is for installation in @file{/usr/local},
+and would not include a new version of @file{/usr/bin/f77}
+or @file{/usr/local/bin/f77},
+so users could still use the native @code{f77}.
 
 In any case, for @code{g77} to work properly, you @strong{must} ensure
 that the binaries you distribute include:
@@ -2027,20 +2069,14 @@ that the binaries you distribute include:
 This is the command most users use to compile Fortran.
 
 @item bin/gcc
-This is the command all users use to compile Fortran, either
-directly or indirectly via the @code{g77} command.
+This is the command some users use to compile Fortran,
+typically when compiling programs written in other languages
+at the same time.
 The @file{bin/gcc} executable file must have been built
 from a @code{gcc} source tree into which a @code{g77} source
 tree was merged and configured, or it will not know how
 to compile Fortran programs.
 
-@item bin/f77
-In installations with no non-GNU native Fortran
-compiler, this is the same as @file{bin/g77}.
-Otherwise, it should be omitted from the distribution,
-so the one on already on a particular system does
-not get overwritten.
-
 @item info/g77.info*
 This is the documentation for @code{g77}.
 If it is not included, users will have trouble understanding
@@ -2063,42 +2099,45 @@ easily.
 
 @item man/man1/g77.1
 This is the short man page for @code{g77}.
-It is out of date, but you might as well include it
-for people who really like man pages.
+It is not always kept up-to-date,
+but you might as well include it
+for people who really like ``man'' pages.
 
-@item man/man1/f77.1
-In installations where @code{f77} is the same as @code{g77},
-this is the same as @file{man/man1/g77.1}.
-Otherwise, it should be omitted from the distribution,
-so the one already on a particular system does not
-get overwritten.
+@cindex gcc-lib directory
+@cindex directories, gcc-lib
+@item lib/gcc-lib
+This is the directory containing the ``private'' files
+installed by and for @code{gcc}, @code{g77}, @code{g++},
+and other GNU compilers.
 
 @item lib/gcc-lib/@dots{}/f771
 This is the actual Fortran compiler.
 
-@item lib/gcc-lib/@dots{}/libf2c.a
+@item lib/gcc-lib/@dots{}/libg2c.a
 This is the run-time library for @code{g77}-compiled programs.
 @end table
 
 Whether you want to include the slightly updated (and possibly
-improved) versions of @code{cc1}, @code{cc1plus}, and whatever other
+improved) versions of @file{cc1}, @file{cc1plus}, and whatever other
 binaries get rebuilt with the changes the GNU Fortran distribution
 makes to the GNU back end, is up to you.
-These changes are
-highly unlikely to break any compilers, and it is possible
-they'll fix back-end bugs that can be demonstrated using front
-ends other than GNU Fortran's.
+These changes are highly unlikely to break any compilers,
+because they involve doing things like adding to the
+list of acceptable compiler options
+(so, for example, @file{cc1plus} accepts, and ignores,
+options that only @file{f771} actually processes).
 
 Please assure users that unless
 they have a specific need for their existing,
-older versions of @code{gcc} command,
+older versions of @file{gcc} command,
 they are unlikely to experience any problems by overwriting
 it with your version---though they could certainly protect
 themselves by making backup copies first!
+
 Otherwise, users might try and install your binaries
 in a ``safe'' place, find they cannot compile Fortran
 programs with your distribution (because, perhaps, they're
-picking up their old version of the @code{gcc} command,
+invoking their old version of the @file{gcc} command,
 which does not recognize Fortran programs), and assume
 that your binaries (or, more generally, GNU Fortran
 distributions in general) are broken, at least for their
index 4b72acc6a2e18eb1312d6eaea10d9b7011191d56..92d9e9a580b0879c3203bd7761adaba9634b81a3 100644 (file)
@@ -18,6 +18,32 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+/* This file contains a filter for the main `gcc' driver, which is
+   replicated for the `g77' driver by adding this filter.  The purpose
+   of this filter is to be basically identical to gcc (in that
+   it faithfully passes all of the original arguments to gcc) but,
+   unless explicitly overridden by the user in certain ways, ensure
+   that the needs of the language supported by this wrapper are met.
+
+   For GNU Fortran (g77), we do the following to the argument list
+   before passing it to `gcc':
+
+   1.  Make sure `-lg2c -lm' is at the end of the list.
+
+   2.  Make sure each time `-lg2c' or `-lm' is seen, it forms
+       part of the series `-lg2c -lm'.
+
+   #1 and #2 are not done if `-nostdlib' or any option that disables
+   the linking phase is present, or if `-xfoo' is in effect.  Note that
+   a lack of source files or -l options disables linking.
+
+   This program was originally made out of gcc/cp/g++spec.c, but the
+   way it builds the new argument list was rewritten so it is much
+   easier to maintain, improve the way it decides to add or not add
+   extra arguments, etc.  And several improvements were made in the
+   handling of arguments, primarily to make it more consistent with
+   `gcc' itself.  */
+
 #include "config.h"
 
 #include <sys/types.h>
@@ -33,23 +59,211 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #endif
 
-/* This bit is set if we saw a `-xfoo' language specification.  */
-#define LANGSPEC       (1<<1)
-/* This bit is set if they did `-lm' or `-lmath'.  */
-#define MATHLIB                (1<<2)
-/* This bit is set if they did `-lc'.  */
-#define WITHLIBC       (1<<3)
+#include <f/version.h>
 
 #ifndef MATH_LIBRARY
 #define MATH_LIBRARY "-lm"
 #endif
 
 #ifndef FORTRAN_LIBRARY
-#define FORTRAN_LIBRARY "-lf2c"
+#define FORTRAN_LIBRARY "-lg2c"
 #endif
 
+/* Options this driver needs to recognize, not just know how to
+   skip over.  */
+typedef enum
+{
+  OPTION_b,                    /* Aka --prefix. */
+  OPTION_B,                    /* Aka --target. */
+  OPTION_c,                    /* Aka --compile. */
+  OPTION_driver,               /* Wrapper-specific option. */
+  OPTION_E,                    /* Aka --preprocess. */
+  OPTION_help,                 /* --help. */
+  OPTION_i,                    /* -imacros, -include, -include-*. */
+  OPTION_l,
+  OPTION_L,                    /* Aka --library-directory. */
+  OPTION_M,                    /* Aka --dependencies. */
+  OPTION_MM,                   /* Aka --user-dependencies. */
+  OPTION_nostdlib,             /* Aka --no-standard-libraries, or
+                                  -nodefaultlibs. */
+  OPTION_o,                    /* Aka --output. */
+  OPTION_S,                    /* Aka --assemble. */
+  OPTION_syntax_only,          /* -fsyntax-only. */
+  OPTION_v,                    /* Aka --verbose. */
+  OPTION_version,              /* --version. */
+  OPTION_V,                    /* Aka --use-version. */
+  OPTION_x,                    /* Aka --language. */
+  OPTION_                      /* Unrecognized or unimportant. */
+} Option;
+
+/* The original argument list and related info is copied here.  */
+static int g77_xargc;
+static char **g77_xargv;
+static void (*g77_fn)();
+
+/* The new argument list will be built here.  */
+static int g77_newargc;
+static char **g77_newargv;
+
 extern char *xmalloc PROTO((size_t));
 
+/* --- This comes from gcc.c (2.8.1) verbatim: */
+
+/* This defines which switch letters take arguments.  */
+
+#define DEFAULT_SWITCH_TAKES_ARG(CHAR)      \
+  ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \
+   || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \
+   || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \
+   || (CHAR) == 'L' || (CHAR) == 'A')
+
+#ifndef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) DEFAULT_SWITCH_TAKES_ARG(CHAR)
+#endif
+
+/* This defines which multi-letter switches take arguments.  */
+
+#define DEFAULT_WORD_SWITCH_TAKES_ARG(STR)             \
+ (!strcmp (STR, "Tdata") || !strcmp (STR, "Ttext")     \
+  || !strcmp (STR, "Tbss") || !strcmp (STR, "include") \
+  || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
+  || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
+  || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
+  || !strcmp (STR, "isystem") || !strcmp (STR, "specs"))
+
+#ifndef WORD_SWITCH_TAKES_ARG
+#define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR)
+#endif
+
+/* --- End of verbatim.  */
+
+/* Assumes text[0] == '-'.  Returns number of argv items that belong to
+   (and follow) this one, an option id for options important to the
+   caller, and a pointer to the first char of the arg, if embedded (else
+   returns NULL, meaning no arg or it's the next argv).
+
+   Note that this also assumes gcc.c's pass converting long options
+   to short ones, where available, has already been run.  */
+
+static void
+lookup_option (xopt, xskip, xarg, text)
+     Option *xopt;
+     int *xskip;
+     char **xarg;
+     char *text;
+{
+  Option opt = OPTION_;
+  int skip;
+  char *arg = NULL;
+
+  if ((skip = SWITCH_TAKES_ARG (text[1])))
+    skip -= (text[2] != '\0'); /* See gcc.c. */
+
+  if (text[1] == 'B')
+    opt = OPTION_B, skip = (text[2] == '\0'), arg = text + 2;
+  else if (text[1] == 'b')
+    opt = OPTION_b, skip = (text[2] == '\0'), arg = text + 2;
+  else if ((text[1] == 'c') && (text[2] == '\0'))
+    opt = OPTION_c, skip = 0;
+  else if ((text[1] == 'E') && (text[2] == '\0'))
+    opt = OPTION_E, skip = 0;
+  else if (text[1] == 'i')
+    opt = OPTION_i, skip = 0;
+  else if (text[1] == 'l')
+    opt = OPTION_l;
+  else if (text[1] == 'L')
+    opt = OPTION_L, arg = text + 2;
+  else if (text[1] == 'o')
+    opt = OPTION_o;
+  else if ((text[1] == 'S') && (text[2] == '\0'))
+    opt = OPTION_S, skip = 0;
+  else if (text[1] == 'V')
+    opt = OPTION_V, skip = (text[2] == '\0');
+  else if ((text[1] == 'v') && (text[2] == '\0'))
+    opt = OPTION_v, skip = 0;
+  else if (text[1] == 'x')
+    opt = OPTION_x, arg = text + 2;
+  else
+    {
+      if ((skip = WORD_SWITCH_TAKES_ARG (text + 1)) != 0)  /* See gcc.c. */
+       ;
+      else if (! strncmp (text, "-fdriver", 8))  /* Really --driver!! */
+       opt = OPTION_driver;    /* Never mind arg, this is unsupported. */
+      else if (! strcmp (text, "-fhelp"))  /* Really --help!! */
+       opt = OPTION_help;
+      else if (! strcmp (text, "-M"))
+       opt = OPTION_M;
+      else if (! strcmp (text, "-MM"))
+       opt = OPTION_MM;
+      else if (! strcmp (text, "-nostdlib")
+              || ! strcmp (text, "-nodefaultlibs"))
+       opt = OPTION_nostdlib;
+      else if (! strcmp (text, "-fsyntax-only"))
+       opt = OPTION_syntax_only;
+      else if (! strcmp (text, "-dumpversion"))
+       opt = OPTION_version;
+      else if (! strcmp (text, "-Xlinker")
+              || ! strcmp (text, "-specs"))
+       skip = 1;
+      else
+       skip = 0;
+    }
+
+  if (xopt != NULL)
+    *xopt = opt;
+  if (xskip != NULL)
+    *xskip = skip;
+  if (xarg != NULL)
+    {
+      if ((arg != NULL)
+         && (arg[0] == '\0'))
+       *xarg = NULL;
+      else
+       *xarg = arg;
+    }
+}
+
+/* Append another argument to the list being built.  As long as it is
+   identical to the corresponding arg in the original list, just increment
+   the new arg count.  Otherwise allocate a new list, etc.  */
+
+static void
+append_arg (arg)
+     char *arg;
+{
+  static int newargsize;
+
+#if 0
+  fprintf (stderr, "`%s'\n", arg);
+#endif
+
+  if (g77_newargv == g77_xargv
+      && g77_newargc < g77_xargc
+      && (arg == g77_xargv[g77_newargc]
+         || ! strcmp (arg, g77_xargv[g77_newargc])))
+    {
+      ++g77_newargc;
+      return;                  /* Nothing new here. */
+    }
+
+  if (g77_newargv == g77_xargv)
+    {                          /* Make new arglist. */
+      int i;
+
+      newargsize = (g77_xargc << 2) + 20;      /* This should handle all. */
+      g77_newargv = (char **) xmalloc (newargsize * sizeof (char *));
+
+      /* Copy what has been done so far.  */
+      for (i = 0; i < g77_newargc; ++i)
+       g77_newargv[i] = g77_xargv[i];
+    }
+
+  if (g77_newargc == newargsize)
+    (*g77_fn) ("overflowed output arg list for `%s'", arg);
+
+  g77_newargv[g77_newargc++] = arg;
+}
+
 void
 lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
      void (*fn)();
@@ -57,227 +271,304 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
      char ***in_argv;
      int *in_added_libraries;
 {
-  int i, j;
+  int argc = *in_argc;
+  char **argv = *in_argv;
+  int i;
+  int verbose = 0;
+  Option opt;
+  int skip;
+  char *arg;
+
+  /* This will be NULL if we encounter a situation where we should not
+     link in libf2c.  */
+  char *library = FORTRAN_LIBRARY;
+
+  /* This will become 0 if anything other than -v and kin (like -V)
+     is seen, meaning the user is trying to accomplish something.
+     If it remains nonzero, and the user wants version info, add stuff to
+     the command line to make gcc invoke all the appropriate phases
+     to get all the version info.  */
+  int add_version_magic = 1;
+
+  /* 0 => -xnone in effect.
+     1 => -xfoo in effect.  */
+  int saw_speclang = 0;
 
-  /* If non-zero, the user gave us the `-v' flag.  */ 
-  int saw_verbose_flag = 0;
+  /* 0 => initial/reset state
+     1 => last arg was -l<library>
+     2 => last two args were -l<library> -lm.  */
+  int saw_library = 0;
 
-  /* This will be 0 if we encounter a situation where we should not
-     link in libstdf77.  */
-  int library = 1;
+  /* The number of input and output files in the incoming arg list.  */
+  int n_infiles = 0;
+  int n_outfiles = 0;
 
-  /* The number of arguments being added to what's in argv, other than
-     libraries.  We use this to track the number of times we've inserted
-     -xf77/-xnone.  */
-  int added = 2;
+#if 0
+  fprintf (stderr, "Incoming:");
+  for (i = 0; i < argc; i++)
+    fprintf (stderr, " %s", argv[i]);
+  fprintf (stderr, "\n");
+#endif
 
-  /* Used to track options that take arguments, so we don't go wrapping
-     those with -xf77/-xnone.  */
-  char *quote = NULL;
+  g77_xargc = argc;
+  g77_xargv = argv;
+  g77_newargc = 0;
+  g77_newargv = argv;
+  g77_fn = fn;
 
-  /* The new argument list will be contained in this.  */
-  char **arglist;
+  /* First pass through arglist.
 
-  /* Non-zero if we saw a `-xfoo' language specification on the
-     command line.  Used to avoid adding our own -xf77 if the user
-     already gave a language for the file.  */
-  int saw_speclang = 0;
+     If -nostdlib or a "turn-off-linking" option is anywhere in the
+     command line, don't do any library-option processing (except
+     relating to -x).  Also, if -v is specified, but no other options
+     that do anything special (allowing -V version, etc.), remember
+     to add special stuff to make gcc command actually invoke all
+     the different phases of the compilation process so all the version
+     numbers can be seen.
 
-  /* "-lm" or "-lmath" if it appears on the command line.  */
-  char *saw_math = 0;
+     Also, here is where all problems with missing arguments to options
+     are caught.  If this loop is exited normally, it means all options
+     have the appropriate number of arguments as far as the rest of this
+     program is concerned.  */
 
-  /* "-lc" if it appears on the command line.  */
-  char *saw_libc = 0;
+  for (i = 1; i < argc; ++i)
+    {
+      if ((argv[i][0] == '+') && (argv[i][1] == 'e'))
+       {
+         add_version_magic = 0;
+         continue;
+       }
 
-  /* An array used to flag each argument that needs a bit set for
-     LANGSPEC, MATHLIB, or WITHLIBC.  */
-  int *args;
+      if ((argv[i][0] != '-') || (argv[i][1] == '\0'))
+       {
+         ++n_infiles;
+         add_version_magic = 0;
+         continue;
+       }
 
-  /* By default, we throw on the math library.  */
-  int need_math = 1;
+      lookup_option (&opt, &skip, NULL, argv[i]);
 
-  /* The total number of arguments with the new stuff.  */
-  int argc;
+      switch (opt)
+       {
+       case OPTION_nostdlib:
+       case OPTION_c:
+       case OPTION_S:
+       case OPTION_syntax_only:
+       case OPTION_E:
+       case OPTION_M:
+       case OPTION_MM:
+         /* These options disable linking entirely or linking of the
+            standard libraries.  */
+         library = 0;
+         add_version_magic = 0;
+         break;
+
+       case OPTION_l:
+         ++n_infiles;
+         add_version_magic = 0;
+         break;
+
+       case OPTION_o:
+         ++n_outfiles;
+         add_version_magic = 0;
+         break;
+
+       case OPTION_v:
+         if (! verbose)
+           fprintf (stderr, "g77 version %s\n", ffe_version_string);
+         verbose = 1;
+         break;
+
+       case OPTION_b:
+       case OPTION_B:
+       case OPTION_L:
+       case OPTION_i:
+       case OPTION_V:
+         /* These options are useful in conjunction with -v to get
+            appropriate version info.  */
+         break;
+
+       case OPTION_version:
+         printf ("\
+GNU Fortran %s\n\
+Copyright (C) 1997 Free Software Foundation, Inc.\n\
+For more version information on components of the GNU Fortran\n\
+compilation system, especially useful when reporting bugs,\n\
+type the command `g77 --verbose'.\n\
+\n\
+GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\
+You may redistribute copies of GNU Fortran\n\
+under the terms of the GNU General Public License.\n\
+For more information about these matters, see the file named COPYING\n\
+or type the command `info -f g77 Copying'.\n\
+", ffe_version_string);
+         exit (0);
+         break;
+
+       case OPTION_help:
+         printf ("\
+Usage: g77 [OPTION]... FORTRAN-SOURCE...\n\
+\n\
+Compile and link Fortran source code to produce an executable program,\n\
+which by default is named `a.out', and can be invoked with the UNIX\n\
+command `./a.out'.\n\
+\n\
+Options:\n\
+--debug                include debugging information in executable.\n\
+--help                 display this help and exit.\n\
+--optimize[=LEVEL]     take extra time and memory to make generated\n\
+                         executable run faster.  LEVEL is 0 for no\n\
+                         optimization, 1 for normal optimization, and\n\
+                         increases through 3 for more optimization.\n\
+--output=PROGRAM       name the executable PROGRAM instead of a.out;\n\
+                         invoke with the command `./PROGRAM'.\n\
+--version              display version information and exit.\n\
+\n\
+Many other options exist to tailor the compilation process, specify\n\
+the dialect of the Fortran source code, specify details of the\n\
+code-generation methodology, and so on.\n\
+\n\
+For more information on g77 and gcc, type the commands `info -f g77'\n\
+and `info -f gcc' to read the Info documentation.\n\
+\n\
+Report bugs to <egcs-bugs@cygnus.org>.\n");
+         exit (0);
+         break;
+
+       case OPTION_driver:
+         (*fn) ("--driver no longer supported", argv[i]);
+         break;
+
+       default:
+         add_version_magic = 0;
+         break;
+       }
 
-  /* The argument list.  */
-  char **argv;
+      /* This is the one place we check for missing arguments in the
+        program.  */
 
-  /* The number of libraries added in.  */
-  int added_libraries;
+      if (i + skip < argc)
+       i += skip;
+      else
+       (*fn) ("argument to `%s' missing", argv[i]);
+    }
 
-  /* The total number of arguments with the new stuff.  */
-  int num_args = 1;
+  if ((n_outfiles != 0) && (n_infiles == 0))
+    (*fn) ("No input files; unwilling to write output files");
 
-  argc = *in_argc;
-  argv = *in_argv;
-  added_libraries = *in_added_libraries;
+  /* Second pass through arglist, transforming arguments as appropriate.  */
 
-  args = (int *) xmalloc (argc * sizeof (int));
-  bzero ((char *) args, argc * sizeof (int));
+  append_arg (argv[0]);        /* Start with command name, of course. */
 
-  for (i = 1; i < argc; i++)
+  for (i = 1; i < argc; ++i)
     {
-      /* If the previous option took an argument, we swallow it here.  */
-      if (quote)
+      if (argv[i][0] == '\0')
        {
-         quote = NULL;
+         append_arg (argv[i]); /* Interesting.  Just append as is. */
          continue;
        }
 
-      /* We don't do this anymore, since we don't get them with minus
-        signs on them.  */
-      if (argv[i][0] == '\0' || argv[i][1] == '\0')
-       continue;
-
-      if (argv[i][0] == '-')
-       {
-         if (library != 0 && (strcmp (argv[i], "-nostdlib") == 0
-                              || strcmp (argv[i], "-nodefaultlibs") == 0))
-           {
-             library = 0;
-           }
-         else if (strcmp (argv[i], "-lm") == 0
-                  || strcmp (argv[i], "-lmath") == 0
-#ifdef ALT_LIBM
-                  || strcmp (argv[i], ALT_LIBM) == 0
-#endif
-                 )
-           {
-             args[i] |= MATHLIB;
-             need_math = 0;
-           }
-         else if (strcmp (argv[i], "-lc") == 0)
-           args[i] |= WITHLIBC;
-         else if (strcmp (argv[i], "-v") == 0)
-           {
-             saw_verbose_flag = 1;
-             if (argc == 2)
-               {
-                 /* If they only gave us `-v', don't try to link in libf2c. */ 
-                 library = 0;
-               }
-           }
-         else if (strncmp (argv[i], "-x", 2) == 0)
-           saw_speclang = 1;
-         else if (((argv[i][2] == '\0'
-                    && (char *)strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
-                   || strcmp (argv[i], "-Tdata") == 0))
-           quote = argv[i];
-         else if (library != 0 && ((argv[i][2] == '\0'
-                    && (char *) strchr ("cSEM", argv[i][1]) != NULL)
-                   || strcmp (argv[i], "-MM") == 0))
-           {
-             /* Don't specify libraries if we won't link, since that would
-                cause a warning.  */
-             library = 0;
-             added -= 2;
-           }
-         else
-           /* Pass other options through.  */
-           continue;
-       }
-      else
+      if ((argv[i][0] == '-') && (argv[i][1] != 'l'))
        {
-         int len; 
+         /* Not a filename or library. */
+
+         if (saw_library == 1) /* -l<library>. */
+           append_arg (MATH_LIBRARY);
+
+         saw_library = 0;
+
+         lookup_option (&opt, &skip, &arg, argv[i]);
 
-         if (saw_speclang)
+         if (argv[i][1] == '\0')
            {
-             saw_speclang = 0;
+             append_arg (argv[i]);     /* "-" == Standard input. */
              continue;
            }
 
-         /* If the filename ends in .c or .i, put options around it.
-            But not if a specified -x option is currently active.  */
-         len = strlen (argv[i]);
-         if (len > 2
-             && (argv[i][len - 1] == 'c' || argv[i][len - 1] == 'i')
-             && argv[i][len - 2] == '.')
+         if (opt == OPTION_x)
            {
-             args[i] |= LANGSPEC;
-             added += 2;
-           }
-       }
-    }
+             /* Track input language. */
+             char *lang;
 
-  if (quote)
-    (*fn) ("argument to `%s' missing\n", quote);
+             if (arg == NULL)
+               lang = argv[i+1];
+             else
+               lang = arg;
 
-  /* If we know we don't have to do anything, bail now.  */
-  if (! added && ! library)
-    {
-      free (args);
-      return;
-    }
+             saw_speclang = (strcmp (lang, "none") != 0);
+           }
 
-  num_args = argc + added + need_math;
-  arglist = (char **) xmalloc (num_args * sizeof (char *));
+         append_arg (argv[i]);
 
-  /* NOTE: We start at 1 now, not 0.  */
-  for (i = 0, j = 0; i < argc; i++, j++)
-    {
-      arglist[j] = argv[i];
+         for (; skip != 0; --skip)
+           append_arg (argv[++i]);
 
-      /* Make sure -lf2c is before the math library, since libf2c
-        itself uses those math routines.  */
-      if (!saw_math && (args[i] & MATHLIB) && library)
-       {
-         --j;
-         saw_math = argv[i];
+         continue;
        }
 
-      if (!saw_libc && (args[i] & WITHLIBC) && library)
-       {
-         --j;
-         saw_libc = argv[i];
-       }
+      /* A filename/library, not an option. */
 
-      /* Wrap foo.c and foo.i files in a language specification to
-        force the gcc compiler driver to run cc1plus on them.  */
-      if (args[i] & LANGSPEC)
-       {
-         int len = strlen (argv[i]);
-         switch (argv[i][len - 1])
+      if (saw_speclang)
+       saw_library = 0;        /* -xfoo currently active. */
+      else
+       {                       /* -lfoo or filename. */
+         if (strcmp (argv[i], MATH_LIBRARY) == 0
+#ifdef ALT_LIBM
+             || strcmp (argv[i], ALT_LIBM) == 0
+#endif
+             )
            {
-           case 'F':
-             arglist[j++] = "-xf77-cpp-input";
-             break;
-           case 'r':
-             /* Don't do ratfor for ".for".  */
-             if (argv[i][len - 2] == '.')
-               {
-                 arglist[j++] = "-xratfor";
-                 break;
-               }
-           default:
-             arglist[j++] = "-xf77";
-             break;
+             if (saw_library == 1)
+               saw_library = 2;        /* -l<library> -lm. */
+           }
+         else if (strcmp (argv[i], FORTRAN_LIBRARY) == 0)
+           saw_library = 1;    /* -l<library>. */
+         else
+           {           /* Other library, or filename. */
+             if (saw_library == 1)
+               append_arg (MATH_LIBRARY);
+             saw_library = 0;
            }
-         arglist[j++] = argv[i];
-         arglist[j] = "-xnone";
        }
-  }
+      append_arg (argv[i]);
+    }
 
-  /* Add `-lf2c' if we haven't already done so.  */
-  if (library)
-    {
-      arglist[j++] = FORTRAN_LIBRARY;
-      added_libraries++;
+  /* Append `-lg2c -lm' as necessary.  */
+
+  if (! add_version_magic && library)
+    {                          /* Doing a link and no -nostdlib. */
+      if (saw_speclang)
+       append_arg ("-xnone");
+
+      switch (saw_library)
+       {
+       case 0:
+         append_arg (library);
+       case 1:
+         append_arg (MATH_LIBRARY);
+       default:
+         break;
+       }
     }
-  if (saw_math)
-    arglist[j++] = saw_math;
-  else if (library)
+  else if (add_version_magic && verbose)
     {
-      arglist[j++] = MATH_LIBRARY;
-      added_libraries++;
+      append_arg ("-c");
+      append_arg ("-xf77-version");
+      append_arg ("/dev/null");
+      append_arg ("-xnone");
     }
-  if (saw_libc)
-    arglist[j++] = saw_libc;
 
-  arglist[j] = NULL;
+  if (verbose
+      && g77_newargv != g77_xargv)
+    {
+      fprintf (stderr, "Driving:");
+      for (i = 0; i < g77_newargc; i++)
+       fprintf (stderr, " %s", g77_newargv[i]);
+      fprintf (stderr, "\n");
+    }
 
-  *in_argc = j;
-  *in_argv = arglist;
-  *in_added_libraries = added_libraries;
+  *in_argc = g77_newargc;
+  *in_argv = g77_newargv;
 }
 
 /* Called before linking.  Returns 0 on success and -1 on failure. */
index 919ef1f68bbd004df2221d4f706b943dbb2a1ceb..8569ed72ce8ef48f73254fcbb25f2f85006461e6 100644 (file)
@@ -1,6 +1,6 @@
 /* intdoc.c
    Copyright (C) 1997 Free Software Foundation, Inc.
-   Contributed by James Craig Burley (burley@gnu.ai.mit.edu).
+   Contributed by James Craig Burley (burley@gnu.org).
 
 This file is part of GNU Fortran.
 
index eb5c17c81decf112c0fbc9ab958f84c91050dafe..bf8786febdef4e2f2aba07c44b241ab9aa7d7369 100644 (file)
@@ -24,15 +24,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 /* This is the contribution to the `default_compilers' array in gcc.c for
    g77.  */
 
-#ifdef __STDC__        /* Else stringizing of OO below won't work, but in
-                  K&R case we're not building the f77 language. */
-
-#ifdef OBJECT_SUFFIX   /* Not defined compiling gcc.c prior to 2.7.0. */
-#define OO "%O"
-#else
-#define OO ".o"
-#endif
-
   {".F", {"@f77-cpp-input"}},
   {".fpp", {"@f77-cpp-input"}},
   {"@f77-cpp-input",
@@ -60,7 +51,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
                   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
                   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
              %{!S:as %a %Y\
-                     %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
+                     %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
                      %{!pipe:%g.s} %A\n }}}}"}},
   {".r", {"@ratfor"}},
   {"@ratfor",
@@ -75,7 +66,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
           %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
           %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
           %{!S:as %a %Y\
-          %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
+          %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
            %{!pipe:%g.s} %A\n }}"}},
   {".f", {"@f77"}},
   {".for", {"@f77"}},
@@ -88,9 +79,28 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
                   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
                   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
              %{!S:as %a %Y\
-                     %{c:%W{o*}%{!o*:-o %w%b" OO "}}%{!c:-o %d%w%u" OO "}\
+                     %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
                      %{!pipe:%g.s} %A\n }}}}"}},
-
-#undef OO
-
-#endif
+  {"@f77-version",
+   {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I \
+      %{C:%{!E:%eGNU C does not support -C without using -E}} \
+      %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} \
+      -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 \
+      %{ansi:-trigraphs -$ -D__STRICT_ANSI__} \
+      %{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
+      %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional \
+      %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z \
+      /dev/null /dev/null \n\
+     f771 -fnull-version %(f771) \
+      %{!Q:-quiet} -dumpbase g77-version.f %{d*} %{m*} %{a} \
+      %{g*} %{O*} %{W*} %{w} %{pedantic*} \
+      -version -fversion %{f*} %{I*} -o %g.s /dev/null \n\
+     as %a %Y -o %g%O %g.s %A \n\
+     ld %l %X -o %g %g%O %{A} %{d} %{e*} %{m} %{N} %{n} \
+      %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} \
+      %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
+      %{static:} %{L*} %D -lg2c -lm \
+      %{!nostdlib:%{!nodefaultlibs:%G %L %G}} \
+      %{!A:%{!nostdlib:%{!nostartfiles:%E}}} \
+      %{T*} \n\
+     %g \n"}},
index f208f9a4c3d47bc21b88168f41f0a3dac08d48a3..2ce6b8bf1ffd34d88f62aca20d0fe22d02ff0ddb 100644 (file)
@@ -32,6 +32,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "flags.j"
 #include "input.j"
 #include "tree.j"
+#include "output.j"  /* Must follow tree.j so TREE_CODE is defined! */
 #endif
 
 #ifdef DWARF_DEBUGGING_INFO
@@ -1848,6 +1849,23 @@ ffelex_file_fixed (ffewhereFile wf, FILE *f)
   ffelex_current_wl_ = ffewhere_line_unknown ();
   ffelex_current_wc_ = ffewhere_column_unknown ();
   latest_char_in_file = '\n';
+
+  if (ffe_is_null_version ())
+    {
+      /* Just substitute a "program" directly here.  */
+
+      char line[] = "      call g77__fvers;call g77__ivers;call g77__uvers;end";
+      char *p;
+
+      column = 0;
+      for (p = &line[0]; *p != '\0'; ++p)
+       column = ffelex_image_char_ (*p, column);
+
+      c = EOF;
+
+      goto have_line;          /* :::::::::::::::::::: */
+    }
+
   goto first_line;             /* :::::::::::::::::::: */
 
   /* Come here to get a new line. */
@@ -1995,6 +2013,9 @@ ffelex_file_fixed (ffewhereFile wf, FILE *f)
 
       column = ffelex_final_nontab_column_;
     }
+
+ have_line:                    /* :::::::::::::::::::: */
+
   ffelex_card_image_[column] = '\0';
   ffelex_card_length_ = column;
 
index 753c861ea2f84ef01428cb1a76c181420968687e..06031ce289da90c989b3b2bbcdde90363afdece1 100644 (file)
@@ -5,7 +5,7 @@
 @c The text of this file appears in the file BUGS
 @c in the G77 distribution, as well as in the G77 manual.
 
-@c 1998-05-19
+@c 1998-05-20
 
 @ifclear NEWSONLY
 @node News
@@ -98,7 +98,7 @@ and the corresponding alias-analysis code.
 
 (Version 1.0.1 of @code{egcs} has the alias-analysis
 code, but not the @code{__restrict__} keyword.
-@code{g77} users benefit from the alias-analysis
+@code{egcs} @code{g77} users benefit from the alias-analysis
 code despite the lack of the @code{__restrict__} keyword,
 which is a C-language construct.)
 
@@ -215,7 +215,7 @@ archive members.
 
 This should make it easier to write portable applications
 that have their own (non-Fortran) @code{main()} routine
-to properly set up the @code{libf2c} environment, even
+properly set up the @code{libf2c} environment, even
 when @code{libf2c} (now @code{libg2c}) is a shared library.
 
 @item
@@ -227,7 +227,7 @@ Other cleaning up of the configuration and build process
 has been performed as well.
 
 @item
-Use @code{install-info} to update the directory of
+@code{install-info} now used to update the directory of
 Info documentation to contain an entry for @code{g77}
 (during installation).
 
diff --git a/gcc/f/output.j b/gcc/f/output.j
new file mode 100644 (file)
index 0000000..f995fcb
--- /dev/null
@@ -0,0 +1,28 @@
+/* output.j -- Wrapper for GCC's output.h
+   Copyright (C) 1998 Free Software Foundation, Inc.
+   Contributed by James Craig Burley (burley@gnu.org).
+
+This file is part of GNU Fortran.
+
+GNU Fortran is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Fortran is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Fortran; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.  */
+
+#ifndef MAKING_DEPENDENCIES
+#ifndef _J_f_output
+#define _J_f_output
+#include "gansidecl.h"
+#include "output.h"
+#endif
+#endif
index 3ed059b082cd059d958ba24f4e0aeed6ccc7660e..9367d8b7cd094f40f72b7e6df46e0dfd246e6ce3 100644 (file)
@@ -75,8 +75,4 @@ typedef enum
 #define dmpout stderr
 #endif
 
-#ifndef isascii
-#define isascii(c) ((unsigned char)(c) <= 0x7f)
-#endif
-
 #endif
index de1fe78a13fc6ec05cf24ae4d3db4211a6ccd204..addafc4083d0443352913b924145980032affcc8 100644 (file)
@@ -45,12 +45,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 /* Include files. */
 
+#include "proj.h"
+
 #if FFECOM_targetCURRENT == FFECOM_targetGCC
 #include "config.j"
 #include "rtl.j"
 #endif
 
-#include "proj.h"
 #include "ste.h"
 #include "bld.h"
 #include "com.h"
index c93ffd310b00499fa856fbf540342dfaa136c817..56c44ba9f7ac1efefb3e3611cbff343b82a3a5d5 100644 (file)
@@ -80,6 +80,7 @@ bool ffe_is_ident_ = TRUE;
 bool ffe_is_init_local_zero_ = FFETARGET_defaultIS_INIT_LOCAL_ZERO;
 bool ffe_is_mainprog_;         /* TRUE if current prog unit known to be
                                   main. */
+bool ffe_is_null_version_ = FALSE;
 bool ffe_is_onetrip_ = FALSE;
 bool ffe_is_silent_ = TRUE;
 bool ffe_is_typeless_boz_ = FALSE;
@@ -175,7 +176,7 @@ ffe_decode_option (argc, argv)
          ffe_is_do_internal_checks_ = TRUE;
        }
       else if (strcmp (&opt[2], "null-version") == 0)
-       ;       /* Someday generate program to print version info.  */
+       ffe_set_is_null_version (TRUE);
       else if (strcmp (&opt[2], "ident") == 0)
        ffe_set_is_ident (TRUE);
       else if (strcmp (&opt[2], "no-ident") == 0)
index 0e159cecda131841b56595fef19484dab84dccbd..20994bd3392b7c357a120cab3a9aa887a88e4249 100644 (file)
@@ -95,6 +95,7 @@ extern bool ffe_is_globals_;
 extern bool ffe_is_ident_;
 extern bool ffe_is_init_local_zero_;
 extern bool ffe_is_mainprog_;
+extern bool ffe_is_null_version_;
 extern bool ffe_is_onetrip_;
 extern bool ffe_is_silent_;
 extern bool ffe_is_typeless_boz_;
@@ -182,6 +183,7 @@ void ffe_terminate_4 (void);
 #define ffe_is_ident() ffe_is_ident_
 #define ffe_is_init_local_zero() ffe_is_init_local_zero_
 #define ffe_is_mainprog() ffe_is_mainprog_
+#define ffe_is_null_version() ffe_is_null_version_
 #define ffe_is_onetrip() ffe_is_onetrip_
 #define ffe_is_pedantic() ffe_is_pedantic_
 #define ffe_is_pedantic_not_90() (ffe_is_pedantic_ && !ffe_is_90_)
@@ -233,6 +235,7 @@ void ffe_terminate_4 (void);
 #define ffe_set_is_ident(f) (ffe_is_ident_ = (f))
 #define ffe_set_is_init_local_zero(f) (ffe_is_init_local_zero_ = (f))
 #define ffe_set_is_mainprog(f) (ffe_is_mainprog_ = (f))
+#define ffe_set_is_null_version(f) (ffe_is_null_version_ = (f))
 #define ffe_set_is_onetrip(f) (ffe_is_onetrip_ = (f))
 #define ffe_set_is_pedantic(f) (ffe_is_pedantic_ = (f))
 #define ffe_set_is_saveall(f) (ffe_is_saveall_ = (f))
index 409de1c860e908ab61f9f8829f973817c8cfe76d..a7dc4391b104cd9dafc403be7816a2b8d8c5d791 100644 (file)
@@ -1 +1 @@
-char *ffe_version_string = "0.5.22-release";
+char *ffe_version_string = "egcs-0.5.23";