Restore circa-0.5.22 capabilities of `g77' driver:

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
This commit is contained in:
Craig Burley 1998-06-15 03:37:33 -04:00 committed by Dave Love
parent e74e8c843a
commit 95a1b67649
21 changed files with 2091 additions and 1595 deletions

View 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

View 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:
@ -32,55 +32,16 @@
#
# 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/).
#
# 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`
#
# 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)
#
# 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*
#
# 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
#
# 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
#
# 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

View 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@
#
# 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) $<
#
# 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)
#
# 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
#
# 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:

View 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"

View 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"

View 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. */

View File

@ -26,42 +26,12 @@
# 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*\""
diff_excludes="-x f/BUGS -x f/NEWS -x f/INSTALL -x f/intdoc.texi"
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
# 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

View 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

View 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

File diff suppressed because it is too large Load Diff

View 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;
/* If non-zero, the user gave us the `-v' flag. */
int saw_verbose_flag = 0;
/* This will be NULL if we encounter a situation where we should not
link in libf2c. */
char *library = FORTRAN_LIBRARY;
/* This will be 0 if we encounter a situation where we should not
link in libstdf77. */
int library = 1;
/* 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;
/* 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;
/* Used to track options that take arguments, so we don't go wrapping
those with -xf77/-xnone. */
char *quote = NULL;
/* The new argument list will be contained in this. */
char **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. */
/* 0 => -xnone in effect.
1 => -xfoo in effect. */
int saw_speclang = 0;
/* "-lm" or "-lmath" if it appears on the command line. */
char *saw_math = 0;
/* 0 => initial/reset state
1 => last arg was -l<library>
2 => last two args were -l<library> -lm. */
int saw_library = 0;
/* "-lc" if it appears on the command line. */
char *saw_libc = 0;
/* The number of input and output files in the incoming arg list. */
int n_infiles = 0;
int n_outfiles = 0;
/* An array used to flag each argument that needs a bit set for
LANGSPEC, MATHLIB, or WITHLIBC. */
int *args;
#if 0
fprintf (stderr, "Incoming:");
for (i = 0; i < argc; i++)
fprintf (stderr, " %s", argv[i]);
fprintf (stderr, "\n");
#endif
/* By default, we throw on the math library. */
int need_math = 1;
g77_xargc = argc;
g77_xargv = argv;
g77_newargc = 0;
g77_newargv = argv;
g77_fn = fn;
/* The total number of arguments with the new stuff. */
int argc;
/* First pass through arglist.
/* The argument list. */
char **argv;
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.
/* The number of libraries added in. */
int added_libraries;
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. */
/* The total number of arguments with the new stuff. */
int num_args = 1;
argc = *in_argc;
argv = *in_argv;
added_libraries = *in_added_libraries;
args = (int *) xmalloc (argc * sizeof (int));
bzero ((char *) args, argc * sizeof (int));
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] == '+') && (argv[i][1] == 'e'))
{
quote = NULL;
add_version_magic = 0;
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 ((argv[i][0] != '-') || (argv[i][1] == '\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;
++n_infiles;
add_version_magic = 0;
continue;
}
else
{
int len;
if (saw_speclang)
lookup_option (&opt, &skip, NULL, argv[i]);
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;
}
/* This is the one place we check for missing arguments in the
program. */
if (i + skip < argc)
i += skip;
else
(*fn) ("argument to `%s' missing", argv[i]);
}
if ((n_outfiles != 0) && (n_infiles == 0))
(*fn) ("No input files; unwilling to write output files");
/* Second pass through arglist, transforming arguments as appropriate. */
append_arg (argv[0]); /* Start with command name, of course. */
for (i = 1; i < argc; ++i)
{
if (argv[i][0] == '\0')
{
append_arg (argv[i]); /* Interesting. Just append as is. */
continue;
}
if ((argv[i][0] == '-') && (argv[i][1] != 'l'))
{
/* 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 (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 (arg == NULL)
lang = argv[i+1];
else
lang = arg;
saw_speclang = (strcmp (lang, "none") != 0);
}
append_arg (argv[i]);
for (; skip != 0; --skip)
append_arg (argv[++i]);
continue;
}
/* A filename/library, not an option. */
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
)
{
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;
}
}
append_arg (argv[i]);
}
if (quote)
(*fn) ("argument to `%s' missing\n", quote);
/* Append `-lg2c -lm' as necessary. */
/* If we know we don't have to do anything, bail now. */
if (! added && ! library)
{
free (args);
return;
}
if (! add_version_magic && library)
{ /* Doing a link and no -nostdlib. */
if (saw_speclang)
append_arg ("-xnone");
num_args = argc + added + need_math;
arglist = (char **) xmalloc (num_args * sizeof (char *));
/* NOTE: We start at 1 now, not 0. */
for (i = 0, j = 0; i < argc; i++, j++)
{
arglist[j] = argv[i];
/* Make sure -lf2c is before the math library, since libf2c
itself uses those math routines. */
if (!saw_math && (args[i] & MATHLIB) && library)
switch (saw_library)
{
--j;
saw_math = argv[i];
case 0:
append_arg (library);
case 1:
append_arg (MATH_LIBRARY);
default:
break;
}
if (!saw_libc && (args[i] & WITHLIBC) && library)
{
--j;
saw_libc = argv[i];
}
/* 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])
{
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;
}
arglist[j++] = argv[i];
arglist[j] = "-xnone";
}
}
/* Add `-lf2c' if we haven't already done so. */
if (library)
{
arglist[j++] = FORTRAN_LIBRARY;
added_libraries++;
}
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. */

View 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.

View 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"}},

View 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;

View 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).

28
gcc/f/output.j Normal file
View File

@ -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

View File

@ -75,8 +75,4 @@ typedef enum
#define dmpout stderr
#endif
#ifndef isascii
#define isascii(c) ((unsigned char)(c) <= 0x7f)
#endif
#endif

View 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"

View 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)

View 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))

View File

@ -1 +1 @@
char *ffe_version_string = "0.5.22-release";
char *ffe_version_string = "egcs-0.5.23";