OSDN Git Service

* Makefile.in (start.encap): Do not depend on LIBGCC1.
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
index beafcd5..2049d24 100644 (file)
@@ -1,5 +1,6 @@
 # Makefile for GNU C compiler.
-#   Copyright (C) 1987, 88, 90-99, 2000 Free Software Foundation, Inc.
+#   Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995
+#   1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 #This file is part of GNU CC.
 
@@ -67,13 +68,16 @@ ALLOCA_FINISH = true
 # separate from BOOT_CFLAGS because people tend to override optimization
 # flags and we'd like them to still have warnings turned on.  They are free
 # to explicitly turn warnings off if they wish.
+# LOOSE_CFLAGS are the CFLAGS to use when compiling something which is only
+# compiled with gcc, such as libgcc and the frontends other than C.
 # XCFLAGS is used for most compilations but not when using the GCC just built.
 # TCFLAGS is used for compilations with the GCC just built.
 XCFLAGS =
 TCFLAGS =
 CFLAGS = -g @stage1_warn_cflags@
 BOOT_CFLAGS = -O2 $(CFLAGS)
-WARN_CFLAGS = -W -Wall -Wtraditional
+WARN_CFLAGS = -pipe -W -Wall -Wtraditional -pedantic -Wno-long-long
+LOOSE_CFLAGS = `echo $(CFLAGS) | sed -e 's/-pedantic//' -e 's/-Wtraditional//'`
 # These exists to be overridden by the x-* and t-* files, respectively.
 X_CFLAGS =
 T_CFLAGS =
@@ -107,9 +111,7 @@ LN_S=@LN_S@
 # These permit overriding just for certain files.
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
-MAKEINFO = `if [ -f $(objdir)/../texinfo/makeinfo/Makefile ] ; \
-       then echo $(objdir)/../texinfo/makeinfo/makeinfo ; \
-       else echo makeinfo ; fi`
+MAKEINFO = @MAKEINFO@
 MAKEINFOFLAGS =
 TEXI2DVI = texi2dvi
 # For GNUmake: let us decide what gets passed to recursive makes.
@@ -160,12 +162,12 @@ INSTALL_ASSERT_H = install-assert-h
 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
 # Usually the one we just built.
 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
-GCC_FOR_TARGET = ./xgcc -B$(build_tooldir)/bin/ -B./ -I$(build_tooldir)/include
+GCC_FOR_TARGET = ./xgcc -B$(build_tooldir)/bin/ -B./ -isystem $(build_tooldir)/include
 
 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
 # It omits XCFLAGS, and specifies -B./.
-# It also specifies -I./include to find, e.g., stddef.h.
-GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
+# It also specifies -isystem ./include to find, e.g., stddef.h.
+GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) -isystem ./include $(TCFLAGS)
 
 # Specify the abi to use when building the c++ runtime
 GXX_ABI_FLAG=@GXX_ABI_FLAG@
@@ -196,7 +198,9 @@ AR_FOR_TARGET = ` \
        t='$(program_transform_cross_name)'; echo ar | sed -e $$t ; \
     fi; \
   fi`
-AR_FLAGS_FOR_TARGET = rc
+AR_FLAGS_FOR_TARGET = 
+AR_CREATE_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) rc
+AR_EXTRACT_FOR_TARGET = $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) x
 RANLIB_FOR_TARGET = ` \
   if [ -f $(objdir)/../binutils/ranlib ] ; then \
     echo $(objdir)/../binutils/ranlib ; \
@@ -215,11 +219,16 @@ RANLIB_TEST_FOR_TARGET = \
 # Dir to search for system headers.  Overridden by cross-make.
 SYSTEM_HEADER_DIR = /usr/include
 
+# Where to find some libiberty headers.
+HASHTAB_H   = $(srcdir)/../include/hashtab.h
+OBSTACK_H   = $(srcdir)/../include/obstack.h
+
 # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
 CROSS_SYSTEM_HEADER_DIR = $(tooldir)/sys-include
 
-# Control whether to run fixproto.
+# Control whether to run fixproto and fixincludes.
 STMP_FIXPROTO = stmp-fixproto
+STMP_FIXINC = stmp-fixinc
 
 # Test to see whether <limits.h> exists in the system header files.
 LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
@@ -244,7 +253,7 @@ GTHREAD_FLAGS=@gthread_flags@
 gcc_version=@gcc_version@
 gcc_version_trigger=@gcc_version_trigger@
 version=$(gcc_version)
-mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
+mainversion=`grep version_string $(srcdir)/version.c | sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/'`
 
 # Common prefix for installation directories.
 # NOTE: This directory must exist when you start installation.
@@ -352,16 +361,12 @@ LIBGCC2_DEBUG_CFLAGS = -g1
 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
 
 # Additional options to use when compiling libgcc2.a.
-# Some targets override this to -Iinclude
+# Some targets override this to -isystem include
 LIBGCC2_INCLUDES =
 
 # Additional target-dependent options for compiling libgcc2.a.
 TARGET_LIBGCC2_CFLAGS =
 
-# Things which must be built before building libgcc2.a.
-# Some targets override this to stmp-int-hdrs
-LIBGCC2_DEPS =
-
 # libgcc1-test target (must also be overridable for a target)
 LIBGCC1_TEST = libgcc1-test
 
@@ -421,6 +426,10 @@ LIBCONVERT =
 # Control whether header files are installed.
 INSTALL_HEADERS=install-headers
 
+# Control whether Info documentation is built and installed.
+BUILD_INFO = @BUILD_INFO@
+INSTALL_INFO = @INSTALL_INFO@
+
 # Additional directories of header files to run fixincludes on.
 # These should be directories searched automatically by default
 # just as /usr/include is.
@@ -475,6 +484,7 @@ CPP_INSTALL_NAME = `t='$(program_transform_name)'; echo cpp | sed -e $$t`
 PROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo protoize | sed -e $$t`
 UNPROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo unprotoize | sed -e $$t`
 GCOV_INSTALL_NAME = `t='$(program_transform_name)'; echo gcov | sed -e $$t`
+GCCBUG_INSTALL_NAME = `t='$(program_transform_name)'; echo gccbug | sed -e $$t`
 
 # Actual name to use when installing a cross-compiler.
 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t`
@@ -579,7 +589,9 @@ HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
            $(HOST_INTLLIBS) $(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) \
            $(HOST_CLIB)
 
-HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o $(HOST_PREFIX)ggc-none.o
+HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o \
+               $(HOST_PREFIX)ggc-none.o $(HOST_PREFIX)gensupport.o
+
 HOST_PRINT = $(HOST_PREFIX)print-rtl.o
 HOST_ERRORS = $(HOST_PREFIX)errors.o
 
@@ -614,6 +626,8 @@ LANG_EXTRA_HEADERS = @all_headers@
 # ??? The choices here will need some experimenting with.
 ORDINARY_FLAGS_TO_PASS = \
        "AR_FLAGS_FOR_TARGET=$(AR_FLAGS_FOR_TARGET)" \
+       "AR_CREATE_FOR_TARGET=$(AR_CREATE_FOR_TARGET)" \
+       "AR_EXTRACT_FOR_TARGET=$(AR_EXTRACT_FOR_TARGET)" \
        "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
        "BISON=$(BISON)" \
        "BISONFLAGS=$(BISONFLAGS)" \
@@ -653,7 +667,10 @@ PREPEND_DOTDOT_TO_RELATIVE_PATHS = sed \
        -e 's|%% *|../|g' \
        -e 's|%||g'
 SUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \
-  "CC=`echo @quoted_cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
+       "CC=`echo @quoted_cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
+# Flags to pass when recursing into a frontend subdirectory.
+LANG_FLAGS_TO_PASS = $(SUBDIR_FLAGS_TO_PASS) \
+       "CFLAGS=$(LOOSE_CFLAGS)"
 #\f
 # Lists of files for various purposes.
 
@@ -672,11 +689,12 @@ OBJS = diagnostic.o \
  dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o \
  integrate.o jump.o cse.o loop.o unroll.o flow.o combine.o varray.o \
  regclass.o regmove.o local-alloc.o global.o reload.o reload1.o caller-save.o \
- insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o \
+ insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o regrename.o \
  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o \
  profile.o insn-attrtab.o $(out_object_file) $(EXTRA_OBJS) convert.o \
  mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o hash.o \
- predict.o lists.o ggc-common.o $(GGC) simplify-rtx.o
+ predict.o lists.o ggc-common.o $(GGC) simplify-rtx.o ssa.o bb-reorder.o \
+ sibcall.o conflict.o timevar.o ifcvt.o
 
 # GEN files are listed separately, so they can be built before doing parallel
 #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
@@ -684,29 +702,23 @@ OBJS = diagnostic.o \
 GEN= genemit genoutput genrecog genextract genflags gencodes genconfig \
  genpeep gengenrtl gencheck
 
-CCCP=@cpp_main@
-
 # Files to be copied away after each stage in building.
 STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  insn-attr.h insn-attrtab.c insn-opinit.c tree-check.h \
  s-flags s-config s-codes s-mlib s-unders s-genrtl \
  s-output s-recog s-emit s-extract s-peep s-check \
- s-attr s-attrtab s-opinit s-crt s-crtS s-crt0 \
+ s-attr s-attrtab s-opinit s-crt0 \
  genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \
  genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \
  genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \
  genattr$(build_exeext) genopinit$(build_exeext) gengenrtl$(build_exeext) \
  gencheck$(build_exeext) \
  xgcc$(exeext) xcpp$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \
- $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
- $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
- protoize$(exeext) unprotoize$(exeext) \
+ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) cc1obj$(exeext) \
+ enquire$(exeext) protoize$(exeext) unprotoize$(exeext) \
  specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
- gcov$(exeext) *.bp \
- *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
- *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.gcse *.flow2 *.peephole2 \
- *.[si] libcpp.a \
+ gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libgcc libgcc.mk \
  $(LANG_STAGESTUFF)
 
 # Members of libgcc1.a.
@@ -752,7 +764,7 @@ CONFIG_H =
 MACHMODE_H = machmode.h machmode.def
 RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
 RTL_H = $(RTL_BASE_H) genrtl.h
-TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h
+TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def
 BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h
 DEMANGLE_H = $(srcdir)/../include/demangle.h
 RECOG_H = recog.h
@@ -760,6 +772,9 @@ EXPR_H = expr.h insn-codes.h
 REGS_H = regs.h varray.h $(MACHMODE_H)
 INTEGRATE_H = integrate.h varray.h
 LOOP_H = loop.h varray.h basic-block.h
+GCC_H = gcc.h version.h
+GGC_H = ggc.h varray.h
+TIMEVAR_H = timevar.h timevar.def
 #\f
 # Language makefile fragments.
 
@@ -801,6 +816,12 @@ Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
 $(srcdir)/configure: $(srcdir)/configure.in
        cd $(srcdir); autoconf
 
+gccbug:        $(srcdir)/gccbug.in
+       CONFIG_FILES=gccbug CONFIG_HEADERS= ./config.status 
+
+mklibgcc: $(srcdir)/mklibgcc.in
+       CONFIG_FILES=mklibgcc CONFIG_HEADERS= ./config.status 
+
 # cstamp-h.in controls rebuilding of config.in.
 # It is named cstamp-h.in and not stamp-h.in so the mostlyclean rule doesn't
 # delete it.  A stamp file is needed as autoheader won't update the file if
@@ -834,15 +855,15 @@ all.internal: start.encap rest.encap doc
 # This is what to compile if making a cross-compiler.
 # Note that we can compile enquire using the cross-compiler just built,
 # although we can't run it on this machine.
-all.cross: native gcc-cross xcpp$(exeext) specs stmp-headers $(STMP_FIXPROTO) \
+all.cross: native gcc-cross xcpp$(exeext) specs \
        $(LIBGCC) $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc
 # This is what to compile if making gcc with a cross-compiler.
 all.build: native xgcc$(exeext) xcpp$(exeext) $(EXTRA_PARTS) lang.all.build
 # This is what must be made before installing GCC and converting libraries.
-start.encap: native xgcc$(exeext) xcpp$(exeext) specs $(LIBGCC1) \
+start.encap: native xgcc$(exeext) xcpp$(exeext) specs \
        xlimits.h lang.start.encap
 # These can't be made until after GCC can run.
-rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
+rest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
 # This is what is made with the host's compiler
 # whether making a cross compiler or not.
 native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \
@@ -919,133 +940,11 @@ xlimits.h: glimits.h limitx.h limity.h
        mv tmp-xlimits.h xlimits.h
 #\f
 # Build libgcc.a.
-# This is done in two parts because some functions, in libgcc1.c,
-# must be compiled with something other than GCC,
-# while the rest, in libgcc2.c, must be compiled with xgcc.
-# That means we can't do libgcc2.c until after xgcc, cc1, etc.
-
-# Use this as value of LIBGCC1 to cause conversion to GNU library format.
-# LIBCONVERT should put its output in libgcc1.conv.
-libgcc1.conv: libgcc1.a
-       $(LIBCONVERT) libgcc1.a libgcc1.conv
-
-# Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
-# Make an empty file instead.
-libgcc1.null: $(GCC_PASSES)
-       echo "void __foo () {}" > dummy.c
-       $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
-       $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) libgcc1.null dummy$(objext)
-       rm -f dummy$(objext) dummy.c
-
-# This is $(LIBGCC1) for a cross-compiler.
-# We have no automatic way of building libgcc1.a,
-# so it's up to the installer to find a way to do that.
-# This rule deliberately does not depend on libgcc1.a
-# so that it will fail if the installer hasn't provided it.
-libgcc1.cross:
-       mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
-
-# Compile the library of arithmetic subroutines with the native compiler.
-# Don't compile it with GCC!
-# (That would cause most arithmetic functions to call themselves.)
-#
-# NOTE: If you modify these rules substantially, please be sure to
-# check at least config/i386/t-sco5 and possibly other makefile
-# fragments.
-libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
-       -rm -f tmplibgcc1.a
-# Actually build it in tmplibgcc1.a, then rename at end,
-# so that libgcc1.a itself remains nonexistent if compilation is aborted.
-# -e causes any failing command to make this rule fail.
-# -e doesn't work in certain shells, so we test $$? as well.
-# lynx has a broken ar, it always complains when the initial library is
-# empty, thus this command works only if we don't do -e
-# There is a trailing backslash (\) deleted from the following line.
-#      set -e;
-       for name in $(LIB1FUNCS); \
-       do \
-         echo $${name}; \
-         rm -f $${name}$(objext); \
-         $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
-         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-         mv libgcc1$(objext) $${name}$(objext); \
-         $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
-         rm -f $${name}$(objext); \
-       done
-# Some shells crash when a loop has no items.
-# So make sure there is always at least one--`..'.
-# Then ignore it.
-# We don't use -e here because there are if statements
-# that should not make the command give up when the if condition is false.
-# Instead, we test for failure after each command where it matters.
-       for file in .. $(LIB1FUNCS_EXTRA); \
-       do \
-         if [ x$${file} != x.. ]; then \
-           name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
-           echo $${name}; \
-           if [ $${name}.asm = $${file} ]; then \
-             cp $${file} $${name}.s || exit 1; file=$${name}.s; \
-           else true; fi; \
-           $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
-           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
-           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           rm -f $${name}.s $${name}$(objext); \
-         else true; \
-         fi; \
-       done
-       -if $(RANLIB_TEST_FOR_TARGET) ; then \
-         $(RANLIB_FOR_TARGET) tmplibgcc1.a; \
-       else true; fi
-       mv tmplibgcc1.a libgcc1.a
-
-# Build libgcc1.a from assembler source.  LIB1ASMFUNCS is the list of
-# functions.  LIB1ASMSRC is the name of the source file in the config
-# subdirectory.
-libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
-       -rm -f tmplibgcc1.a libgcc1.S
-       cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
-# Actually build it in tmplibgcc1.a, then rename at end,
-# so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
-# -e causes any failing command to make this rule fail.
-# -e doesn't work in certain shells, so we test $$? as well.
-# lynx has a broken ar, it always complains when the initial library is
-# empty, thus this command works only if we don't do -e
-# There is a trailing backslash (\) deleted from the following line.
-#      set -e;
-       for name in $(LIB1ASMFUNCS); \
-       do \
-         echo $${name}; \
-         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
-         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-         mv libgcc1$(objext) $${name}$(objext); \
-         $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc1.a $${name}$(objext); \
-         rm -f $${name}$(objext); \
-       done
-       -rm -f libgcc1.S
-       mv tmplibgcc1.a libgcc1-asm.a
-
-# Generate assembly versions of the functions required for libgcc1.
-# You'll still need to massage the code by hand (possibly hacking
-# underscores and local labels) but this will get you started.
-libgcc1.S: libgcc1.c $(CONFIG_H) config.status
-       -rm -f libgcc1.S
-       touch libgcc1.S
-       for name in $(LIB1FUNCS); \
-       do \
-         echo $${name}; \
-         $(OLDCC) -DIN_LIBGCC1 $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
-         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-         echo '#ifdef ' L$${name} >> libgcc1.S; \
-         cat  libgcc1.s >> libgcc1.S; \
-         echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
-         echo "" >> libgcc1.S; \
-       done
 
 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
 # But recompiling cc1 should not force recompilation of libgcc2.a.
 # If you want to force recompilation, delete libgcc2.a.
-libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs $(STMP_FIXPROTO)
+libgcc2.ready: $(GCC_PASSES) stmp-int-hdrs $(STMP_FIXPROTO)
        -if [ -f libgcc2.ready ] ; then \
                true; \
        else \
@@ -1053,123 +952,39 @@ libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs $(STMP_FIXPROTO)
        fi
 
 LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
-libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
-   $(MACHMODE_H) longlong.h frame.h gbl-ctors.h config.status stmp-int-hdrs \
-   tsystem.h
-# Actually build it in tmplibgcc2.a, then rename at end,
-# so that libgcc2.a itself remains nonexistent if compilation is aborted.
-       -rm -f tmplibgcc2.a
-# -e causes any failing command to make this rule fail.
-# -e doesn't work in certain shells, so we test $$? as well.
-# lynx has a broken ar, it always complains when the initial library is
-# empty, thus this command works only if we don't do -e
-# There is a trailing backslash (\) deleted from the following line.
-#      set -e;
-       for name in $(LIB2FUNCS); \
-       do \
-         echo $${name}; \
-         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
-             $(MAYBE_USE_COLLECT2) $(srcdir)/libgcc2.c -o $${name}$(objext); \
-         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-         $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \
-         rm -f $${name}$(objext); \
-       done
-       for name in $(LIB2FUNCS_EH); \
-       do \
-         echo $${name}; \
-         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -fexceptions $(INCLUDES) -c \
-             -DL$${name} $(srcdir)/libgcc2.c -o $${name}$(objext); \
-         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-         $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \
-         rm -f $${name}$(objext); \
-       done
-       if [ x$(FPBIT) != x ]; then \
-         for name in $(FPBIT_FUNCS); \
-         do \
-           echo $${name}; \
-           $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
-               -DFINE_GRAINED_LIBRARIES $(FPBIT) -o $${name}$(objext); \
-           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \
-           rm -f $${name}$(objext); \
-         done; \
-       else true; fi;
-       if [ x$(DPBIT) != x ]; then \
-         for name in $(DPBIT_FUNCS); \
-         do \
-           echo $${name}; \
-           $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
-               -DFINE_GRAINED_LIBRARIES $(DPBIT) -o _dp$${name}$(objext); \
-           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a _dp$${name}$(objext); \
-           rm -f _dp$${name}$(objext); \
-         done; \
-       else true; fi;
-# Some shells crash when a loop has no items.
-# So make sure there is always at least one--`..'.
-# Then ignore it.
-# We don't use -e here because there are if statements
-# that should not make the command give up when the if condition is false.
-# Instead, we test for failure after each command where it matters.
-       for file in $(LIB2ADD); do \
-         name=`echo $${file} | sed -e 's/[.][cSo]$$//' -e 's/[.]asm$$//' -e 's/[.]txt$$//'`; \
-         oname=` echo $${name} | sed -e 's,.*/,,'`; \
-         if [ $${name}.txt = $${file} ]; then \
-           for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
-             $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-               AR_FOR_TARGET="$(AR_FOR_TARGET)" \
-               AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" CC="$(CC)" \
-               CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
-               HOST_PREFIX_1="$(HOST_PREFIX_1)" \
-               LANGUAGES="$(LANGUAGES)" \
-               LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
-             if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-             $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${f}; \
-             rm -f $${f}; \
-           else true; \
-           fi; done; \
-         else \
-           echo $${name}; \
-           if [ $${name}.asm = $${file} ]; then \
-             cp $${file} $${name}.s || exit 1; file=$${name}.s; \
-           else true; fi; \
-           $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
-           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${oname}$(objext); \
-           rm -f $${name}.s $${oname}$(objext); \
-         fi; \
-       done
-       mv tmplibgcc2.a libgcc2.a
-# These lines were deleted from above the mv command
-# because ranlibing libgcc.a itself should suffice.
-#      -if [ x${HPUX_GAS} = x ] ; then \
-#        if $(RANLIB_TEST_FOR_TARGET) ; then \
-#          $(RANLIB_FOR_TARGET) tmplibgcc2.a;
-#        else true; fi; \
-#      else true; fi
-
-# Combine the various libraries into a single library, libgcc.a.
-libgcc.a: $(LIBGCC1) $(LIBGCC2)
-       -rm -rf tmplibgcc.a libgcc.a tmpcopy
-       mkdir tmpcopy
-       -if [ x$(LIBGCC1) != x ];                       \
-       then (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC1));    \
-       else true;                                      \
-       fi
-# Some versions of ar (specifically the one in RISC/os 5.x), create an
-# unwritable table of contents file, and then print an error message when
-# the second ar command tries to overwrite this file.  To avoid the error
-# message from ar, we make sure all files are writable.
-       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
-       (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC2))
-       (cd tmpcopy; $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) ../tmplibgcc.a *$(objext))
-       rm -rf tmpcopy
-       -if $(RANLIB_TEST_FOR_TARGET) ; then \
-         $(RANLIB_FOR_TARGET) tmplibgcc.a; \
-       else true; fi
-# Actually build it in tmplibgcc.a, then rename at end,
-# so that libgcc.a itself remains nonexistent if compilation is aborted.
-       mv tmplibgcc.a libgcc.a
+
+libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD)
+       objext='$(objext)' \
+       OLDCC='$(OLDCC)' \
+       LIBGCC1='$(LIBGCC1)' \
+       LIB1FUNCS='$(LIB1FUNCS)' \
+       LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \
+       LIB1FUNCS_EXTRA='$(LIB1FUNCS_EXTRA)' \
+       LIB2FUNCS='$(LIB2FUNCS)' \
+       LIB2FUNCS_EH='$(LIB2FUNCS_EH)' \
+       LIB2ADD='$(LIB2ADD)' \
+       FPBIT='$(FPBIT)' \
+       FPBIT_FUNCS='$(FPBIT_FUNCS)' \
+       DPBIT='$(DPBIT)' \
+       DPBIT_FUNCS='$(DPBIT_FUNCS)' \
+       MULTILIBS=`$(GCC_FOR_TARGET) --print-multi-lib` \
+       EXTRA_MULTILIB_PARTS='$(EXTRA_MULTILIB_PARTS)' \
+         $(SHELL) mklibgcc > tmp-libgcc.mk
+       $(SHELL) $(srcdir)/move-if-change tmp-libgcc.mk libgcc.mk
+
+libgcc.a: libgcc2.ready libgcc.mk
+       $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
+         HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
+         AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+         AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \
+         AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
+         OLDCC="$(OLDCC)" CCLIBFLAGS="$(CCLIBFLAGS)" CFLAGS="$(CFLAGS)" \
+         RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
+         RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
+         LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \
+         INCLUDES="$(INCLUDES)" MAYBE_USE_COLLECT2="$(MAYBE_USE_COLLECT2)" \
+         CONFIG_H="$(CONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \
+         -f libgcc.mk all
 
 # Use the genmultilib shell script to generate the information the gcc
 # driver program needs to select the library directory based on the
@@ -1181,93 +996,26 @@ s-mlib: $(srcdir)/genmultilib Makefile
          "$(MULTILIB_DIRNAMES)" \
          "$(MULTILIB_MATCHES)" \
          "$(MULTILIB_EXCEPTIONS)" \
-         "$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
+         "$(MULTILIB_EXTRA_OPTS)" \
+         "$(MULTILIB_EXCLUSIONS)" > tmp-mlib.h
        $(SHELL) $(srcdir)/move-if-change tmp-mlib.h multilib.h
        touch s-mlib
 
 # Build multiple copies of libgcc.a, one for each target switch.
-stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
-   frame.h tsystem.h \
-   $(LIB2ADD) $(MACHMODE_H) longlong.h gbl-ctors.h config.status
-       for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
-         dir=`echo $$i | sed -e 's/;.*$$//'`; \
-         flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
-         $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-           AR_FOR_TARGET="$(AR_FOR_TARGET)" \
-           AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
-           CC="$(CC)" CFLAGS="$(CFLAGS)" \
-           RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
-           RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
-           LANGUAGES="$(LANGUAGES)" \
-           HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
-           LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
-           MULTILIB_CFLAGS="$${flags}" \
-           LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
-           dir="$${dir}" stmp-multilib-sub; \
-         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-       done
-       touch stmp-multilib
-
-# Subroutine of stmp-multilib so make -n works.
-stmp-multilib-sub:
-       rm -f $(LIBGCC2)
-       if [ -d $(dir) ]; then \
-         cd $(dir); \
-         rm -f libgcc.a $(EXTRA_MULTILIB_PARTS); \
-       else true; \
-       fi
+stmp-multilib: libgcc2.ready libgcc.mk
        $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
+         HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
          AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+         AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \
          AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
-         CC="$(CC)" CFLAGS="$(CFLAGS)" \
-         HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
-         LANGUAGES="$(LANGUAGES)" \
-         LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
-       if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
-       then true; \
-       else rm -f $(LIBGCC1); \
-       fi
-       if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
-       then true; \
-       else \
-         $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-           AR_FOR_TARGET="$(AR_FOR_TARGET)" \
-           AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
-           CC="$(CC)" CFLAGS="$(CFLAGS)" \
-           HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
-           LANGUAGES="$(LANGUAGES)" \
-           LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
-       fi
-       rm -rf tmplibgcc.a tmpcopy
-       mkdir tmpcopy
-       if [ x$(LIBGCC1) != x ]; \
-       then (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC1)); \
-       else true; \
-       fi
-# Some versions of ar (specifically the one in RISC/os 5.x), create an
-# unwritable table of contents file, and then print an error message when
-# the second ar command tries to overwrite this file.  To avoid the error
-# message from ar, we make sure all files are writable.
-       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
-       (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC2))
-       (cd tmpcopy; $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) ../tmplibgcc.a *$(objext))
-       rm -rf libgcc2.a tmpcopy
-       if $(RANLIB_TEST_FOR_TARGET) ; then \
-         $(RANLIB_FOR_TARGET) tmplibgcc.a; \
-       else true; fi
-       if [ -d $(dir) ]; then true; else mkdir $(dir); fi
-       mv tmplibgcc.a $(dir)/libgcc.a
-       for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
-         $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-           AR_FOR_TARGET="$(AR_FOR_TARGET)" \
-           AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
-           CC="$(CC)" CFLAGS="$(CFLAGS)" \
-           HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
-           LANGUAGES="$(LANGUAGES)" \
-           MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
-         mv t$${f} $(dir)/$${f}; \
-       else true; \
-       fi; done
+         OLDCC="$(OLDCC)" CCLIBFLAGS="$(CCLIBFLAGS)" CFLAGS="$(CFLAGS)" \
+         RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
+         RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
+         LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" \
+         INCLUDES="$(INCLUDES)" MAYBE_USE_COLLECT2="$(MAYBE_USE_COLLECT2)" \
+         CONFIG_H="$(CONFIG_H)" MACHMODE_H="$(MACHMODE_H)" \
+         -f libgcc.mk all
+       touch stmp-multilib
 
 # Compile two additional files that are linked with every program
 # linked using GCC on systems using COFF or ELF, for the sake of C++
@@ -1286,24 +1034,25 @@ $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
          -fno-exceptions $(CRTSTUFF_T_CFLAGS) @inhibit_libc@ \
          -c $(srcdir)/crtstuff.c -DCRT_END -o $(T)crtend$(objext)
 
-# On some systems we also want to install versions of these files
-# compiled using PIC for use in shared libraries.
-crtbeginS.o crtendS.o: s-crtS ; @true
+# These are versions of crtbegin and crtend for shared libraries.
+$(T)crtbeginS.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
+  defaults.h frame.h gbl-ctors.h stmp-int-hdrs tsystem.h
+       $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
+         -finhibit-size-directive -fno-inline-functions \
+         -fno-exceptions $(CRTSTUFF_T_CFLAGS_S) @inhibit_libc@ \
+         -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \
+         -o $(T)crtbeginS$(objext)
 
-s-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
+$(T)crtendS.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
   defaults.h frame.h gbl-ctors.h stmp-int-hdrs tsystem.h
-       $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
-         -DCRT_BEGIN -DCRTSTUFFS_O -finhibit-size-directive \
-         -fno-inline-functions -fno-exceptions @inhibit_libc@ -g0 \
-         -c $(srcdir)/crtstuff.c
-       mv crtstuff$(objext) crtbeginS$(objext)
-       $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
-         -DCRT_END -DCRTSTUFFS_O -finhibit-size-directive \
-         -fno-inline-functions -fno-exceptions @inhibit_libc@ -g0 \
-         -c $(srcdir)/crtstuff.c -o crtendS$(objext)
-       touch s-crtS
-
-# Compile the start modules crt0.o and mcrt0.o that are linked with every program
+       $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
+         -finhibit-size-directive -fno-inline-functions \
+         -fno-exceptions $(CRTSTUFF_T_CFLAGS_S) @inhibit_libc@ \
+         -c $(srcdir)/crtstuff.c -DCRT_END -DCRTSTUFFS_O \
+         -o $(T)crtendS$(objext)
+
+# Compile the start modules crt0.o and mcrt0.o that are linked with
+# every program
 crt0.o: s-crt0 ; @true
 mcrt0.o: s-crt0; @true
 
@@ -1321,7 +1070,7 @@ s-crt0:   $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
 
 # C language specific files.
 
-c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h ggc.h \
+c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h $(GGC_H) \
     $(srcdir)/c-parse.h c-tree.h c-common.h input.h flags.h system.h toplev.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
 $(srcdir)/c-parse.h: $(srcdir)/c-parse.c
@@ -1337,24 +1086,24 @@ $(srcdir)/c-parse.y: c-parse.in
 $(srcdir)/c-gperf.h: c-parse.gperf
        gperf -L C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \
           -k1,3,$$ $(srcdir)/c-parse.gperf >tmp-gperf.h || ( \
-       echo "See " $(website)/cvs.html#generated_files >&2 ; \
+       echo "See $(website)/cvs.html#generated_files" >&2 ; \
        exit 1 )
         $(SHELL) $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
 
-c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h ggc.h \
+c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h $(GGC_H) \
     c-lex.h flags.h function.h output.h toplev.h defaults.h
 c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h \
     flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h
-c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h ggc.h \
+c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h $(GGC_H) \
     c-lex.h toplev.h output.h function.h
 c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \
     c-common.h $(srcdir)/c-parse.h $(srcdir)/c-gperf.h c-pragma.h input.h \
-    intl.h flags.h toplev.h output.h mbchar.h ggc.h
+    intl.h flags.h toplev.h output.h mbchar.h $(GGC_H)
 c-aux-info.o : c-aux-info.c  $(CONFIG_H) system.h $(TREE_H) c-tree.h \
     c-common.h flags.h toplev.h
 c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
 c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) function.h \
-    defaults.h c-pragma.h toplev.h ggc.h
+    defaults.h c-pragma.h toplev.h $(GGC_H)
 c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \
     c-common.h flags.h toplev.h $(EXPR_H)
 mbchar.o: mbchar.c $(CONFIG_H) system.h mbchar.h
@@ -1369,7 +1118,7 @@ collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(COLLECT2_OBJS) $(LIBS)
 
 collect2.o : collect2.c $(CONFIG_H) system.h gstab.h intl.h \
-       $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h
+       $(OBSTACK_H) $(DEMANGLE_H) collect2.h version.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
        -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
        -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
@@ -1406,7 +1155,8 @@ s-under: $(GCC_PASSES)
 # A file used by all variants of C.
 
 c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
-       c-common.h flags.h toplev.h output.h c-pragma.h $(RTL_H) ggc.h
+       c-common.h flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
+       $(EXPR_H)
 
 # Language-independent files.
 
@@ -1418,13 +1168,13 @@ DRIVER_DEFINES = \
   -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
   -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\"
 gcc.o: gcc.c $(CONFIG_H) system.h intl.h multilib.h \
-    Makefile $(lang_specs_files) prefix.h gcc.h
+    Makefile $(lang_specs_files) prefix.h $(GCC_H)
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
   $(DRIVER_DEFINES) \
   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
 
-gccspec.o: gccspec.c $(CONFIG_H) system.h gcc.h
-cppspec.o: cppspec.c $(CONFIG_H) system.h gcc.h
+gccspec.o: gccspec.c $(CONFIG_H) system.h $(GCC_H)
+cppspec.o: cppspec.c $(CONFIG_H) system.h $(GCC_H)
 
 tree-check.h: s-check ; @true
 s-check : gencheck $(srcdir)/move-if-change
@@ -1443,20 +1193,20 @@ gencheck.o : gencheck.c gencheck.h tree.def $(CONFIG_H) hconfig.h system.h \
 
 dumpvers: dumpvers.c
 
-version.o: version.c
+version.o: version.c version.h
 
 ggc-common.o: ggc-common.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
-       flags.h ggc.h varray.h hash.h
+       flags.h $(GGC_H) varray.h hash.h
 
 ggc-simple.o: ggc-simple.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
-       ggc.h varray.h
+       $(GGC_H) varray.h $(TIMEVAR_H)
 
-ggc-page.o: ggc-page.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
-       ggc.h varray.h
+ggc-page.o: ggc-page.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h toplev.h \
+       $(GGC_H) varray.h $(TIMEVAR_H)
 
-ggc-none.o: ggc-none.c $(CONFIG_H) $(RTL_H) ggc.h
+ggc-none.o: ggc-none.c $(CONFIG_H) $(RTL_H) $(GGC_H)
 
-ggc-callbacks.o: ggc-callbacks.c $(CONFIG_H) $(RTL_H) $(TREE_H) ggc.h
+ggc-callbacks.o: ggc-callbacks.c $(CONFIG_H) $(RTL_H) $(TREE_H) $(GGC_H)
 
 obstack.o: $(srcdir)/../libiberty/obstack.c $(CONFIG_H)
        rm -f obstack.c
@@ -1471,24 +1221,26 @@ prefix.o: prefix.c $(CONFIG_H) system.h Makefile prefix.h
 convert.o: convert.c $(CONFIG_H) system.h $(TREE_H) flags.h convert.h toplev.h
 
 tree.o : tree.c $(CONFIG_H) system.h $(TREE_H) flags.h function.h toplev.h \
-   ggc.h
-print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H) ggc.h
+   $(GGC_H) $(HASHTAB_H)
+print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H) $(GGC_H)
 stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
-   function.h $(EXPR_H) $(RTL_H) toplev.h ggc.h
+   function.h $(EXPR_H) $(RTL_H) toplev.h $(GGC_H)
 fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
    $(RTL_H) ggc.h
-diagnostic.o : $(CONFIG_H) system.h $(TREE_H) $(RTL_H) tm_p.h flags.h \
-   input.h insn-attr.h insn-codes.h insn-config.h toplev.h intl.h 
+diagnostic.o : diagnostic.c diagnostic.h \
+   $(CONFIG_H) system.h $(TREE_H) $(RTL_H) tm_p.h flags.h \
+   $(GGC_H) input.h insn-attr.h insn-codes.h insn-config.h toplev.h intl.h 
 toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) function.h \
    flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
    insn-codes.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h dwarfout.h \
    dwarf2out.h sdbout.h dbxout.h $(EXPR_H) $(BASIC_BLOCK_H) graph.h loop.h \
-   except.h regs.h $(lang_options_files)
+   except.h regs.h $(TIMEVAR_H) $(lang_options_files)
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
          -DTARGET_NAME=\"$(target_alias)\" \
          -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
 
-rtl.o : rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h ggc.h toplev.h
+rtl.o : rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h $(GGC_H) toplev.h
+gensupport.o : gensupport.c $(CONFIG_H) system.h $(RTL_H) 
 
 print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H) $(BASIC_BLOCK_H)
 rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H)
@@ -1496,20 +1248,20 @@ errors.o : errors.c $(CONFIG_H) system.h errors.h
 
 varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
    function.h defaults.h $(EXPR_H) hard-reg-set.h $(REGS_H) \
-   xcoffout.h output.h c-pragma.h toplev.h dbxout.h sdbout.h ggc.h
+   xcoffout.h output.h c-pragma.h toplev.h dbxout.h sdbout.h $(GGC_H)
 function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    function.h insn-flags.h insn-codes.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
-   insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h ggc.h
+   insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H)
 stmt.o : stmt.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h  \
    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h $(EXPR_H) except.h \
-   $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h ggc.h
+   $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H)
 except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    function.h insn-flags.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
-   insn-config.h $(RECOG_H) output.h except.h toplev.h intl.h ggc.h
+   insn-config.h $(RECOG_H) output.h except.h toplev.h intl.h $(GGC_H)
 expr.o : expr.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h \
    $(REGS_H) insn-flags.h insn-codes.h $(EXPR_H) insn-config.h $(RECOG_H) \
    output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h except.h \
-   ggc.h
+   reload.h $(GGC_H) intl.h
 builtins.o : builtins.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    function.h $(REGS_H) insn-flags.h insn-codes.h $(EXPR_H) insn-config.h \
    $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
@@ -1523,25 +1275,26 @@ explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    insn-codes.h toplev.h function.h
 optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h  \
    insn-flags.h insn-config.h insn-codes.h $(EXPR_H) $(RECOG_H) reload.h \
-   toplev.h ggc.h real.h
+   toplev.h $(GGC_H) real.h
 dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h $(REGS_H) \
    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h \
-   toplev.h gcc.h
+   toplev.h
 sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
    function.h $(EXPR_H) output.h hard-reg-set.h $(REGS_H) defaults.h real.h \
-   insn-config.h $(srcdir)/../include/obstack.h xcoffout.h c-pragma.h \
+   insn-config.h $(OBSTACK_H) xcoffout.h c-pragma.h \
    sdbout.h toplev.h
 dwarfout.o : dwarfout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf.h \
    flags.h insn-config.h reload.h output.h defaults.h toplev.h dwarfout.h
 dwarf2out.o : dwarf2out.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) dwarf2.h \
    flags.h insn-config.h reload.h output.h defaults.h \
    hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h varray.h \
-   ggc.h except.h
+   $(GGC_H) except.h
 xcoffout.o : xcoffout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) xcoffout.h \
-   flags.h toplev.h output.h dbxout.h ggc.h
+   flags.h toplev.h output.h dbxout.h $(GGC_H)
 emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
-   function.h $(REGS_H) insn-config.h $(RECOG_H) real.h ggc.h \
-   $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h
+   function.h $(REGS_H) insn-config.h $(RECOG_H) real.h $(GGC_H) \
+   $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h \
+   $(HASHTAB_H)
 real.o : real.c $(CONFIG_H) system.h $(TREE_H) toplev.h
 integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    $(INTEGRATE_H) insn-flags.h insn-config.h $(EXPR_H) real.h $(REGS_H) \
@@ -1552,35 +1305,41 @@ jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \
 
 simplify-rtx.o : simplify-rtx.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) \
    hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
-   output.h function.h 
+   output.h function.h cselib.h ggc.h $(OBSTACK_H)
 cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
-   real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h function.h ggc.h
+   real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h function.h $(GGC_H)
 gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \
    flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) \
    function.h output.h toplev.h
+sibcall.o : sibcall.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) function.h \
+   hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H)
 resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h system.h \
    $(BASIC_BLOCK_H) $(REGS_H) flags.h output.h resource.h function.h toplev.h \
    insn-attr.h
 lcm.o : lcm.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
-   real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H)
+   real.h insn-config.h insn-attr.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H)
+ssa.o : ssa.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) $(BASIC_BLOCK_H) \
+   output.h insn-config.h
+conflict.o : conflict.c $(CONFIG_H) system.h $(OBSTACK_H) $(HASHTAB_H) \
+   $(RTL_H) $(BASIC_BLOCK_H)
 profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \
    gcov-io.h $(TREE_H) output.h $(REGS_H) toplev.h function.h insn-config.h \
-   ggc.h
+   $(GGC_H)
 loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h $(LOOP_H) insn-config.h \
    insn-flags.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) real.h \
-   $(BASIC_BLOCK_H) function.h toplev.h varray.h except.h
+   $(BASIC_BLOCK_H) function.h toplev.h varray.h except.h cselib.h
 unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h function.h \
    $(INTEGRATE_H) $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) $(LOOP_H) toplev.h \
    varray.h 
 flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h insn-config.h \
    $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
-   insn-flags.h function.h except.h
+   insn-flags.h function.h except.h $(EXPR_H)
 combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h function.h \
    insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
    $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
 regclass.o : regclass.c $(CONFIG_H) system.h $(RTL_H) hard-reg-set.h flags.h \
    $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h real.h \
-   toplev.h function.h output.h ggc.h
+   toplev.h function.h output.h $(GGC_H)
 local-alloc.o : local-alloc.c $(CONFIG_H) system.h $(RTL_H) flags.h \
    $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
    output.h function.h insn-attr.h toplev.h
@@ -1594,7 +1353,7 @@ reload.o : reload.c $(CONFIG_H) system.h $(RTL_H) flags.h output.h $(EXPR_H) \
    function.h real.h toplev.h
 reload1.o : reload1.c $(CONFIG_H) system.h $(RTL_H) real.h flags.h $(EXPR_H) \
    reload.h $(REGS_H) hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
-   $(BASIC_BLOCK_H) $(RECOG_H) output.h function.h toplev.h
+   $(BASIC_BLOCK_H) $(RECOG_H) output.h function.h toplev.h cselib.h
 caller-save.o : caller-save.c $(CONFIG_H) system.h $(RTL_H) flags.h \
    $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) function.h \
    $(RECOG_H) reload.h $(EXPR_H) toplev.h
@@ -1602,7 +1361,8 @@ reorg.o : reorg.c $(CONFIG_H) system.h $(RTL_H) conditions.h hard-reg-set.h \
    $(BASIC_BLOCK_H) $(REGS_H) insn-config.h insn-attr.h insn-flags.h \
    $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h
 alias.o : alias.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h \
-   $(REGS_H) toplev.h output.h $(EXPR_H) insn-flags.h ggc.h function.h
+   $(REGS_H) toplev.h output.h $(EXPR_H) insn-flags.h $(GGC_H) function.h \
+   cselib.h $(TREE_H)
 regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
    $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h function.h \
    $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
@@ -1624,9 +1384,18 @@ dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h
 predict.o: predict.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
    $(RECOG_H) insn-flags.h function.h except.h $(EXPR_H)
-lists.o: lists.c $(CONFIG_H) system.h toplev.h $(RTL_H) ggc.h
-
-$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) ggc.h \
+lists.o: lists.c $(CONFIG_H) system.h toplev.h $(RTL_H) $(GGC_H)
+bb-reorder.o : bb-reorder.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
+   insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
+   $(RECOG_H) insn-flags.h function.h except.h $(EXPR_H)
+timevar.o : timevar.c $(CONFIG_H) system.h $(TIMEVAR_H) flags.h
+regrename.o : regrename.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
+   insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h \
+   $(RECOG_H) function.h resource.h
+ifcvt.o : ifcvt.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) \
+   flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \
+   output.h
+$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) $(GGC_H) \
    $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
    insn-flags.h output.h insn-attr.h insn-codes.h system.h toplev.h function.h
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
@@ -1635,7 +1404,7 @@ $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) ggc.h \
 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
 
-mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h
+mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h version.h
 
 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
@@ -1766,7 +1535,7 @@ s-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
        $(SHELL) $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
        touch s-attrtab
 
-insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) ggc.h $(REGS_H) real.h \
+insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) $(GGC_H) $(REGS_H) real.h \
     conditions.h hard-reg-set.h insn-config.h insn-flags.h insn-attr.h \
     output.h $(RECOG_H) function.h insn-codes.h system.h toplev.h flags.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
@@ -1777,7 +1546,7 @@ s-output : $(md_file) genoutput $(srcdir)/move-if-change
        $(SHELL) $(srcdir)/move-if-change tmp-output.c insn-output.c
        touch s-output
 
-genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) system.h ggc.h
+genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H) system.h $(GGC_H)
 genrtl.c genrtl.h : s-genrtl
        @true   # force gnu make to recheck modification times.
 
@@ -1871,7 +1640,7 @@ genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEP
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
         genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
 
-genattrtab.o : genattrtab.c $(RTL_H)  $(build_xm_file) system.h errors.h ggc.h
+genattrtab.o : genattrtab.c $(RTL_H)  $(build_xm_file) system.h errors.h $(GGC_H)
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
 
 genoutput : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
@@ -1893,7 +1662,7 @@ gengenrtl.o : gengenrtl.c $(RTL_BASE_H) system.h real.h
 # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
 # with the rules for rtl.o, alloca.o, etc.
 $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) system.h $(RTL_H) \
-  bitmap.h ggc.h toplev.h
+  bitmap.h $(GGC_H) toplev.h
        rm -f $(HOST_PREFIX)rtl.c
        sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
@@ -1974,7 +1743,7 @@ $(top_builddir)/intl/libintl.a:
 
 # Make sure all the headers are there for xgettext to scan.
 $(INTL_TARGETS): $(srcdir)/c-gperf.h \
-    $(srcdir)/c-parse.c $(srcdir)/c-parse.h $(srcdir)/cexp.c
+    $(srcdir)/c-parse.c $(srcdir)/c-parse.h
 
 intl.all intl.install intl.uninstall intl.distdir \
   intl.mostlyclean intl.clean intl.distclean intl.maintainer-clean:
@@ -1993,62 +1762,49 @@ intl.distdir-fixup:
 #\f
 # Remake cpp and protoize.
 
-# Making the preprocessor
-cpp$(exeext): $(CCCP)$(exeext)
-       -rm -f cpp$(exeext)
-       $(LN) $(CCCP)$(exeext) cpp$(exeext)
-CCCP_OBJS = cccp.o cexp.o intl.o prefix.o version.o @extra_cpp_objs@ mbchar.o
-cccp$(exeext): $(CCCP_OBJS) $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CCCP_OBJS) $(LIBS)
-cexp.o: $(srcdir)/cexp.c $(CONFIG_H) system.h mbchar.h
-       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
-$(srcdir)/cexp.c: $(srcdir)/cexp.y
-       cd $(srcdir); $(BISON) -o cexp.c cexp.y
-
 PREPROCESSOR_DEFINES = \
   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
   -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
   -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
   -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\"
-# We use $(libsubdir)/$(unlibsubdir) to match the
-# -iprefix argument which gcc will pass if GCC_EXEC_PREFIX is used.
-cccp.o: cccp.c $(CONFIG_H) intl.h pcp.h version.c config.status system.h \
-           mbchar.h prefix.h Makefile.in
-       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-         $(PREPROCESSOR_DEFINES) \
-         -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
 
-LIBCPP_OBJS =  cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o cppfiles.o \
-               cppinit.o cppulp.o prefix.o version.o mbchar.o @extra_cpp_objs@
+LIBCPP_OBJS =  cpplib.o cpphash.o cpperror.o cppexp.o cppfiles.o \
+               cppinit.o cppulp.o cpplex.o mkdeps.o \
+               prefix.o version.o mbchar.o @extra_cpp_objs@
+
+LIBCPP_DEPS =  cpplib.h cpphash.h intl.h system.h
 
 # All the other archives built/used by this makefile are for targets.  This
 # one is strictly for the host.
 #
 libcpp.a: $(LIBCPP_OBJS)
+       -rm -rf libcpp.a
        $(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS)
        if $(RANLIB_TEST) ; then $(RANLIB) libcpp.a ; else true ; fi
 
-cppmain$(exeext): cppmain.o intl.o libcpp.a $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \
+cpp$(exeext): cppmain.o intl.o libcpp.a $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cpp$(exeext) cppmain.o \
        intl.o libcpp.a $(LIBS)
 
-cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h system.h
+cppmain.o:  cppmain.c  $(CONFIG_H) cpplib.h intl.h system.h
 
-cppulp.o:  cppulp.c  $(CONFIG_H) system.h output.h
-cpplib.o:  cpplib.c  $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
-cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
-cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h
-cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h system.h
-cppexp.o:   cppexp.c   $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
-cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h system.h
+cppulp.o:   cppulp.c   $(CONFIG_H) system.h output.h
+cpperror.o: cpperror.c $(CONFIG_H) $(LIBCPP_DEPS)
+cppexp.o:   cppexp.c   $(CONFIG_H) $(LIBCPP_DEPS)
+cpplex.o:   cpplex.c   $(CONFIG_H) $(LIBCPP_DEPS)
+cpplib.o:   cpplib.c   $(CONFIG_H) $(LIBCPP_DEPS)
+cpphash.o:  cpphash.c  $(CONFIG_H) $(LIBCPP_DEPS) $(HASHTAB_H)
+cppfiles.o: cppfiles.c $(CONFIG_H) $(LIBCPP_DEPS) $(HASHTAB_H) mkdeps.h
 
-cppinit.o:  cppinit.c $(CONFIG_H) cpplib.h intl.h system.h \
-               cpphash.h prefix.h output.h Makefile
+cppinit.o:  cppinit.c  $(CONFIG_H) $(LIBCPP_DEPS) $(HASHTAB_H) mkdeps.h \
+               prefix.h output.h Makefile version.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          $(PREPROCESSOR_DEFINES) \
          -c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'`
 
+mkdeps.o: mkdeps.c $(CONFIG_H) system.h mkdeps.h
+
 # Note for the stamp targets, we run the program `true' instead of
 # having an empty command (nothing following the semicolon).
 
@@ -2063,13 +1819,13 @@ unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
 
 protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h \
-   Makefile
+   Makefile version.h
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          $(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \
          $(srcdir)/protoize.c
 
 unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h \
-   $(CONFIG_H) system.h Makefile
+   $(CONFIG_H) system.h Makefile version.h
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          $(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \
          $(srcdir)/unprotoize.c
@@ -2127,12 +1883,13 @@ gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
 
 # Build the include directory including float.h (which no longer depends upon
 # enquire).
-stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
+stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h
 # Copy in the headers provided with gcc.
 # The sed command gets just the last file name component;
 # this is necessary because VPATH could add a dirname.
 # Using basename would be simpler, but some systems don't have it.
 # The touch command is here to workaround an AIX/Linux NFS bug.
+       -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
        for file in .. $(USER_H); do \
          if [ X$$file != X.. ]; then \
            realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
@@ -2156,10 +1913,6 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
        chmod a+r include/README
        touch $@
 
-# Now that float.h no longer depends upon enquire, this is actually a no-op.
-stmp-headers:
-       touch $@
-
 # fixinc.sh depends on this, not on specs directly.
 # The idea is to make sure specs gets built, but not rerun fixinc.sh
 # after each stage just because specs' mtime has changed.
@@ -2179,26 +1932,6 @@ fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \
        export MAKE srcdir ; \
        cd ./fixinc; $(SHELL) $${srcdir}/mkfixinc.sh $(target)
 
-##stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
-##     rm -rf include
-##     mkdir include
-##     if [ x$(FIXINCLUDES) != xMakefile.in ]; \
-##     then \
-##       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
-##         if [ -d $$dir ]; \
-##         then \
-##           $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
-##         else true; fi; \
-##       done; \
-##       if [ x$(INSTALL_ASSERT_H) != x ] ; \
-##       then \
-##         rm -f include/assert.h; \
-##         cp $(srcdir)/assert.h include/assert.h; \
-##         chmod a+r include/assert.h; \
-##       fi \
-##     else true; \
-##     fi
-
 # Build fixed copies of system files.
 stmp-fixinc: fixinc.sh gsyslimits.h
        rm -rf include; mkdir include
@@ -2231,11 +1964,14 @@ stmp-fixinc: fixinc.sh gsyslimits.h
        touch stmp-fixinc
 
 # Files related to the fixproto script.
+# gen-protos and fix-header are compiled with HOST_CC, but they are only
+# used in native and host-x-target builds, so it's safe to link them with
+# libiberty.a.
 
 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
        if [ -d $(SYSTEM_HEADER_DIR) ]; \
        then \
-         CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
+         CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \
          export CC; \
          $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \
          mv tmp-deduced.h deduced.h; \
@@ -2243,12 +1979,12 @@ deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
          touch deduced.h; \
        fi
 
-GEN_PROTOS_OBJS = gen-protos.o scan.o libcpp.a
-gen-protos: $(GEN_PROTOS_OBJS) $(HOST_LIBDEPS)
+GEN_PROTOS_OBJS = gen-protos.o scan.o
+gen-protos: $(GEN_PROTOS_OBJS)
        ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \
-         $(GEN_PROTOS_OBJS) $(HOST_LIBS)
+         $(GEN_PROTOS_OBJS) ../libiberty/libiberty.a
 
-gen-protos.o: gen-protos.c scan.h $(build_xm_file) system.h cpplib.h cpphash.h
+gen-protos.o: gen-protos.c scan.h $(build_xm_file) system.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
 
 scan.o: scan.c scan.h $(build_xm_file) system.h
@@ -2266,10 +2002,10 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefil
 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
            libcpp.a
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
-          scan-decls.o scan.o libcpp.a $(HOST_LIBS)
+          scan-decls.o scan.o libcpp.a $(HOST_LIBS) ../libiberty/libiberty.a
 
-fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \
-       xsys-protos.h $(build_xm_file) system.h cpplib.h cpphash.h
+fix-header.o: fix-header.c $(OBSTACK_H) scan.h \
+       xsys-protos.h $(build_xm_file) system.h cpplib.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
 
 scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h
@@ -2286,13 +2022,11 @@ fixhdr.ready: fix-header
                touch fixhdr.ready; \
        fi
 
-# stmp-headers is to make sure fixincludes has already finished.
+# stmp-int-headers is to make sure fixincludes has already finished.
 # The if statement is so that we don't run fixproto a second time
 # if it has already been run on the files in `include'.
-stmp-fixproto: fixhdr.ready fixproto stmp-headers
-       @echo "Various warnings and error messages from fixproto are normal"
-       -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
-       -if [ -f include/fixed ] ; then true; \
+stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
+       if [ -f include/fixed ] ; then true; \
        else \
          : This line works around a 'make' bug in BSDI 1.1.; \
          FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
@@ -2300,6 +2034,7 @@ stmp-fixproto: fixhdr.ready fixproto stmp-headers
            export mkinstalldirs; \
          if [ -d $(SYSTEM_HEADER_DIR) ] ; then \
            $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
+           if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
          else true; fi; \
          touch include/fixed; \
        fi
@@ -2307,7 +2042,7 @@ stmp-fixproto: fixhdr.ready fixproto stmp-headers
 #\f
 # Remake the info files.
 
-doc: info
+doc: $(BUILD_INFO) gccbug
 info: cpp.info gcc.info lang.info
 
 cpp.info: $(srcdir)/cpp.texi
@@ -2336,7 +2071,7 @@ cpp.dvi: $(srcdir)/cpp.texi
 
 INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
        cd $(srcdir); $(MAKEINFO) -D INSTALLONLY \
-               --no-split -o INSTALL install1.texi
+               --no-split --no-headers -o INSTALL install1.texi
 #\f
 # Deletion of files made during compilation.
 # There are four levels of this:
@@ -2359,21 +2094,15 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
        -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
        -rm -f $(HOST_PREFIX_1)obstack.c
 # Delete the temp files made in the course of building libgcc.a.
-       -rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test
+       -rm -f xlimits.h libgcc1-test
        for name in $(LIB1FUNCS); do rm -f $${name}.c; done
 # Delete other built files.
-       -rm -f t-float.h-cross xsys-protos.hT fp-bit.c dp-bit.c
+       -rm -f t-float.h-cross xsys-protos.hT
 # Delete the stamp and temporary files.
        -rm -f s-* tmp-* stamp-* stmp-*
        -rm -f */stamp-* */tmp-*
 # Delete debugging dump files.
-       -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
-       -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.addressof
-       -rm -f *.regmove *.mach *.bp *.gcse *.flow2 *.peephole2
-       -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
-       -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
-       -rm -f */*.sched2 */*.stack */*.regmove */*.gcse */*.flow2
-       -rm -f */*.peephole2
+       -rm -f *.[0-9][0-9].* */*.[0-9][0-9].*
 # Delete some files made during installation.
        -rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c
        -rm -f collect collect2 mips-tfile mips-tdump alloca.s
@@ -2387,7 +2116,6 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
        -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
 # Delete core dumps.
        -rm -f core */core
-       -rm -f *.bp */*.bp
 
 # Delete all files made by compilation
 # that don't exist in the distribution.
@@ -2458,8 +2186,7 @@ maintainer-clean:
        $(MAKE) INTL_DISTCLEAN= INTL_CLEAN= INTL_MOSTLYCLEAN= \
                intl.maintainer-clean lang.maintainer-clean distclean
        -rm -f c-parse.y c-gperf.h
-       -rm -f c-parse.c c-parse.h c-parse.output
-       -rm -f cexp.c cexp.output TAGS
+       -rm -f c-parse.c c-parse.h c-parse.output TAGS
        -rm -f cpp.info* cpp.??s cpp.*aux
        -rm -f gcc.info* gcc.??s gcc.*aux
 #\f
@@ -2475,8 +2202,8 @@ install: $(INSTALL_TARGET) ; @true
 # Install the driver last so that the window when things are
 # broken is small.
 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
-    $(INSTALL_CPP) install-man install-info intl.install lang.install-normal \
-    install-driver
+    $(INSTALL_CPP) install-man $(INSTALL_INFO) intl.install \
+    lang.install-normal install-driver
 
 # Do nothing while making gcc with a cross-compiler. The person who
 # makes gcc for the target machine has to know how to put a complete
@@ -2605,6 +2332,7 @@ install-common: native installdirs $(EXTRA_PARTS) lang.install-common
            rm -f $(bindir)/gcov$(exeext); \
            $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
        fi
+       $(INSTALL_PROGRAM) gccbug $(bindir)/$(GCCBUG_INSTALL_NAME)
 
 # Install the driver program as $(target_alias)-gcc
 # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
@@ -2642,7 +2370,7 @@ install-info: doc installdirs lang.install-info
        -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
 
 # Install the man pages.
-install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
+install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cpp.1 lang.install-man
        -if [ -f gcc-cross$(exeext) ] ; then \
          rm -f $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
          $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
@@ -2652,9 +2380,9 @@ install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
          $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
          chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
        fi
-       -rm -f $(man1dir)/cccp$(manext)
-       -$(INSTALL_DATA) $(srcdir)/cccp.1 $(man1dir)/cccp$(manext)
-       -chmod a-x $(man1dir)/cccp$(manext)
+       -rm -f $(man1dir)/cpp$(manext)
+       -$(INSTALL_DATA) $(srcdir)/cpp.1 $(man1dir)/cpp$(manext)
+       -chmod a-x $(man1dir)/cpp$(manext)
 
 # Install the library.
 install-libgcc: libgcc.a installdirs
@@ -2705,7 +2433,7 @@ install-include-dir: installdirs
        -chmod a+rx $(libsubdir)/include
 
 # Install the include directory using tar.
-install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
 # We use `pwd`/include instead of just include to problems with CDPATH
 # Unless a full pathname is provided, some shells would print the new CWD,
 # found in CDPATH, corrupting the output.  We could just redirect the
@@ -2717,7 +2445,7 @@ install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
 # So use `exit 0' to ignore its exit status.
 
 # Install the include directory using cpio.
-install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
 # See discussion about the use of `pwd` above
        cd `pwd`/include ; \
        find . -print | cpio -pdum $(libsubdir)/include
@@ -2763,7 +2491,7 @@ uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP)
        -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
        -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(manext)
        -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(manext)
-       -rm -rf $(man1dir)/cccp$(manext)
+       -rm -rf $(man1dir)/cpp$(manext)
        -rm -rf $(man1dir)/protoize$(manext)
        -rm -rf $(man1dir)/unprotoize$(manext)
        -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
@@ -2879,7 +2607,7 @@ check-objc: testsuite/site.exp
 TAGS: force
        cd $(srcdir);                                                   \
        mkdir tmp-tags;                                                 \
-       mv -f c-parse.[ch] cexp.c =*.[chy] tmp-tags;                    \
+       mv -f c-parse.[ch] =*.[chy] tmp-tags;                           \
        etags *.y *.h *.c;                                              \
        mv tmp-tags/* .;                                                \
        rmdir tmp-tags
@@ -2899,8 +2627,7 @@ distdir-cvs: force
 # This target exists to do the initial work before the language specific
 # stuff gets done.
 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
-  $(srcdir)/c-parse.c $(srcdir)/cexp.c $(srcdir)/config.in \
-  $(srcdir)/version.c TAGS
+  $(srcdir)/c-parse.c $(srcdir)/config.in $(srcdir)/version.c TAGS
        @case '$(USE_NLS)' in \
        yes) ;; \
        *) echo "configure with --enable-nls before making a distribution"; \
@@ -2929,7 +2656,7 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
          test -f $(srcdir)/$$file && $(LN_S) $(srcdir)/$$file tmp; \
        done
        if test "$(srcdir)" != "." ; then \
-         for file in c-parse.c cexp.c ; do \
+         for file in c-parse.c ; do \
            test -f ./$$file && $(LN_S) ../$$file tmp; \
          done; \
        fi
@@ -2979,19 +2706,22 @@ distdir: distdir-cvs distdir-start intl.distdir intl.distdir-fixup \
 # The -P option assumes this is GNU diff.
 diff:
        diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
-         -x cexp.c -x -x TAGS -x INSTALL \
-         -x configure -x config.in \
+          -x TAGS -x INSTALL -x configure -x config.in \
          -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
          -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
          $(LANG_DIFF_EXCLUDES) \
          gcc-$(oldversion) gcc-$(version) > gcc-$(oldversion)-$(version).diff
 
+# A list of files to be destroyed during "lean" builds.
+VOL_FILES=`echo $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*`
+
 bootstrap bootstrap-lean: force
 # Only build the C compiler for stage1, because that is the only one that
 # we can guarantee will build with the native compiler, and also it is the
 # only thing useful for building stage2.
        $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
        $(MAKE) stage1
+       -if test $@ = bootstrap-lean; then cd stage1 ; rm -f $(VOL_FILES); else true; fi
 # This used to define ALLOCA as empty, but that would lead to bad results
 # for a subsequent `make install' since that would not have ALLOCA empty.
 # To prevent `make install' from compiling alloca.o and then relinking cc1
@@ -2999,13 +2729,13 @@ bootstrap bootstrap-lean: force
 # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
        $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
        $(MAKE) stage2
-       -if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi
+       -if test $@ = bootstrap-lean; then rm -rf stage1; cd stage2 ; rm -f $(VOL_FILES); else true; fi
        $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
 
 bootstrap2 bootstrap2-lean: force
        $(MAKE) CC="stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
        $(MAKE) stage2
-       -if test $@ = bootstrap2-lean; then rm -rf stage1; else true; fi
+       -if test $@ = bootstrap2-lean; then rm -rf stage1; cd stage2 ; rm -f $(VOL_FILES); else true; fi
        $(MAKE) CC="stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" CFLAGS="$(WARN_CFLAGS) $(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
 
 bootstrap3 bootstrap3-lean: force