OSDN Git Service

* config/i386/i386.c (legitimate_constant_p): Handle UNSPEC_NTPOFF
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
index b8a6bb0..bd84122 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile for GNU Compiler Collection
 # Run 'configure' to generate Makefile from Makefile.in
 
-# Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+# Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
 # 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 #This file is part of GCC.
@@ -59,14 +59,14 @@ MAKEOVERRIDES =
 # Directory where sources are, from where we are.
 VPATH = @srcdir@
 
-build_canonical = @build_canonical@
-host_canonical = @host_canonical@
+build=@build@
+host=@host@
 target=@target@
 target_alias=@target_alias@
 
 # Sed command to transform gcc to installed name.
 program_transform_name = @program_transform_name@
-program_transform_cross_name = s,^,$(target_alias)-,
+program_transform_cross_name = @program_transform_name@
 
 # -----------------------------
 # Directories used during build
@@ -158,13 +158,13 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn)
 
 # These files are to have -Werror bypassed in stage2:
 # These are very hard to completely clean due to target complexities.
-varasm.o-warn = -Wno-error
 gcc.o-warn = -Wno-error
 insn-conditions.o-warn = -Wno-error
-@out_object_file@-warn = -Wno-error
 # Bison-1.75 output often yields (harmless) -Wtraditional warnings
 gengtype-yacc.o-warn = -Wno-error
 c-parse.o-warn = -Wno-error
+# flex output may yield harmless "no previous prototype" warnings
+gengtype-lex.o-warn = -Wno-error
 
 # All warnings have to be shut off in stage1 if the compiler used then
 # isn't gcc; configure determines that.  WARN_CFLAGS will be either
@@ -273,7 +273,7 @@ AR_FOR_TARGET = ` \
   if [ -f $(objdir)/../binutils/ar ] ; then \
     echo $(objdir)/../binutils/ar ; \
   else \
-    if [ "$(host_canonical)" = "$(target)" ] ; then \
+    if [ "$(host)" = "$(target)" ] ; then \
       echo ar; \
     else \
        t='$(program_transform_cross_name)'; echo ar | sed -e $$t ; \
@@ -286,7 +286,7 @@ RANLIB_FOR_TARGET = ` \
   if [ -f $(objdir)/../binutils/ranlib ] ; then \
     echo $(objdir)/../binutils/ranlib ; \
   else \
-    if [ "$(host_canonical)" = "$(target)" ] ; then \
+    if [ "$(host)" = "$(target)" ] ; then \
       echo $(RANLIB); \
     else \
        t='$(program_transform_cross_name)'; echo ranlib | sed -e $$t ; \
@@ -298,7 +298,7 @@ NM_FOR_TARGET = ` \
   elif [ -f $(objdir)/../binutils/nm-new ] ; then \
     echo $(objdir)/../binutils/nm-new ; \
   else \
-    if [ "$(host_canonical)" = "$(target)" ] ; then \
+    if [ "$(host)" = "$(target)" ] ; then \
       echo nm; \
     else \
        t='$(program_transform_cross_name)'; echo nm | sed -e $$t ; \
@@ -471,7 +471,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
 
 # Additional sources to handle exceptions; overridden by targets as needed.
 LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
-   $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c
+   $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
 LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
 
 # nm flags to list global symbols in libgcc object files.
@@ -633,9 +633,9 @@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
 RTL_H = $(RTL_BASE_H) genrtl.h
 PARAMS_H = params.h params.def
 TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def \
-          location.h
+          input.h
 BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
-          hard-reg-set.h
+          hard-reg-set.h cfghooks.h
 COVERAGE_H = coverage.h gcov-io.h gcov-iov.h
 DEMANGLE_H = $(srcdir)/../include/demangle.h
 RECOG_H = recog.h
@@ -793,7 +793,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
 # Language-specific object files for C and Objective C.
 C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
   c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \
-  c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
+  c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o c-options.o prefix.o \
   c-objc-common.o c-dump.o c-pch.o libcpp.a $(C_TARGET_OBJS)
 
 # Language-specific object files for C.
@@ -812,7 +812,8 @@ OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o          \
  haifa-sched.o hashtable.o hooks.o ifcvt.o insn-attrtab.o insn-emit.o     \
  insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o      \
  integrate.o intl.o jump.o  langhooks.o lcm.o lists.o local-alloc.o       \
- loop.o mbchar.o optabs.o params.o predict.o print-rtl.o print-tree.o     \
+ loop.o mbchar.o optabs.o opts.o params.o predict.o                       \
+ print-rtl.o print-tree.o                                                 \
  profile.o ra.o ra-build.o ra-colorize.o ra-debug.o ra-rewrite.o          \
  real.o recog.o reg-stack.o regclass.o regmove.o regrename.o              \
  reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o        \
@@ -820,7 +821,7 @@ OBJS = alias.o bb-reorder.o bitmap.o builtins.o caller-save.o calls.o          \
  sibcall.o simplify-rtx.o sreal.o ssa.o ssa-ccp.o ssa-dce.o stmt.o        \
  stor-layout.o stringpool.o timevar.o toplev.o tracer.o tree.o tree-dump.o \
  tree-inline.o unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o \
- alloc-pool.o et-forest.o cgraph.o cgraphunit.o                                   \
+ alloc-pool.o et-forest.o cgraph.o cgraphunit.o cfghooks.o                \
  $(GGC) $(out_object_file) $(EXTRA_OBJS) $(host_hook_obj)
 
 BACKEND = main.o libbackend.a
@@ -852,7 +853,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
 LIB2FUNCS_ST = _eprintf __gcc_bcmp
 
 # Defined in libgcov.c, included only in gcov library
-LIBGCOV = _gcov
+LIBGCOV = _gcov _gcov_merge_add
 
 FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
     _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
@@ -1112,7 +1113,8 @@ LIBGCC_DEPS = $(GCC_PASSES) $(LANGUAGES) stmp-int-hdrs $(STMP_FIXPROTO) \
        $(MACHMODE_H) longlong.h gbl-ctors.h config.status stmp-int-hdrs \
        tsystem.h $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \
        $(LIB2ADD_ST) $(LIB2ADDEH) $(LIB2ADDEHDEP) $(EXTRA_PARTS) \
-       $(srcdir)/config/$(LIB1ASMSRC)
+       $(srcdir)/config/$(LIB1ASMSRC) \
+       $(srcdir)/gcov-io.h $(srcdir)/gcov-io.c gcov-iov.h
 
 libgcov.a: libgcc.a; @true
 
@@ -1256,10 +1258,10 @@ $(parsedir)/c-parse.y: c-parse.in
 c-incpath.o: c-incpath.c c-incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
                intl.h prefix.h coretypes.h $(TM_H) cppdefault.h
 
-c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
-    $(C_TREE_H) $(GGC_H) $(TARGET_H) flags.h function.h output.h $(EXPR_H) \
-    debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) c-pragma.h \
-    gt-c-decl.h cgraph.h
+c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
+    $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) flags.h function.h output.h \
+    $(EXPR_H) debug.h toplev.h intl.h $(TM_P_H) tree-inline.h $(TIMEVAR_H) \
+    c-pragma.h gt-c-decl.h cgraph.h $(HASHTAB_H) libfuncs.h except.h
 c-typeck.o : c-typeck.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
     $(TARGET_H) flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h $(TM_P_H)
 c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TREE_H) \
@@ -1267,7 +1269,7 @@ c-lang.o : c-lang.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_TR
 c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
     $(RTL_H) debug.h $(C_TREE_H) c-common.h real.h c-incpath.h cppdefault.h \
     c-pragma.h input.h intl.h flags.h toplev.h output.h \
-    mbchar.h $(CPPLIB_H) $(EXPR_H) $(TM_P_H)
+    $(CPPLIB_H) $(EXPR_H) $(TM_P_H)
 c-ppoutput.o : c-ppoutput.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     c-common.h $(TREE_H) $(CPPLIB_H) cpphash.h $(TM_P_H) c-pragma.h
 c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
@@ -1308,16 +1310,23 @@ tlink.o: tlink.c $(DEMANGLE_H) $(HASHTAB_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h
 c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
        $(OBSTACK_H) $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h intl.h \
        $(GGC_H) $(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def \
-       diagnostic.h gt-c-common.h langhooks.h varray.h $(RTL_H) $(TARGET_H)
+       diagnostic.h gt-c-common.h langhooks.h varray.h $(RTL_H) $(TARGET_H) \
+       c-tree.h
 c-pretty-print.o : c-pretty-print.c c-pretty-print.h pretty-print.h \
        $(C_COMMON_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) real.h
 
 c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
         c-pragma.h flags.h toplev.h langhooks.h tree-inline.h diagnostic.h \
-       intl.h debug.h $(C_COMMON_H)
+       intl.h debug.h $(C_COMMON_H) opts.h c-options.h
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
                $< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@
 
+c-options.c: c.opt $(srcdir)/opts.sh c-options.h
+
+c-options.h: c.opt $(srcdir)/opts.sh
+       AWK=$(AWK) $(SHELL) $(srcdir)/opts.sh c-options.c c-options.h \
+               $(srcdir)/c.opt
+
 c-cppbuiltin.o : c-cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
        $(TREE_H) $(C_COMMON_H) c-pragma.h flags.h toplev.h langhooks.h \
        output.h except.h real.h $(TM_P_H)
@@ -1396,12 +1405,12 @@ s-gencheck : Makefile
        $(SHELL) $(srcdir)/move-if-change tmp-gencheck.h gencheck.h
        $(STAMP) s-gencheck
 
-options.h : s-options ; @true
+options_.h : s-options ; @true
 s-options : Makefile
        lof="$(lang_options_files)"; for f in $$lof; do \
            echo "#include \"$$f\""; \
-       done | sed 's|$(srcdir)/||' > tmp-options.h
-       $(SHELL) $(srcdir)/move-if-change tmp-options.h options.h
+       done | sed 's|$(srcdir)/||' > tmp-options_.h
+       $(SHELL) $(srcdir)/move-if-change tmp-options_.h options_.h
        $(STAMP) s-options
 
 specs.h : s-specs ; @true
@@ -1471,13 +1480,15 @@ fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H
 diagnostic.o : diagnostic.c diagnostic.h real.h diagnostic.def \
    $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(TM_P_H) flags.h $(GGC_H) \
    input.h toplev.h intl.h langhooks.h $(LANGHOOKS_DEF_H)
+opts.o : opts.c opts.h $(CONFIG_H) $(SYSTEM_H) \
+       coretypes.h $(TREE_H) $(TM_H) $(LANGHOOKS_H)
 toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
    function.h flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h diagnostic.h \
    debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
    dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
    graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) $(lang_options_files) \
    ssa.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
-   langhooks.h insn-flags.h options.h cfglayout.h real.h cfgloop.h \
+   langhooks.h insn-flags.h options_.h cfglayout.h real.h cfgloop.h \
    hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          -DTARGET_NAME=\"$(target_alias)\" \
@@ -1507,7 +1518,7 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_
    output.h c-pragma.h toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
    $(HASHTAB_H) $(TARGET_H) langhooks.h gt-varasm.h real.h
 function.o : function.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
-   flags.h function.h $(EXPR_H) libfuncs.h $(REGS_H) hard-reg-set.h \
+   flags.h function.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h \
    insn-config.h $(RECOG_H) output.h toplev.h except.h $(HASHTAB_H) $(GGC_H) \
    $(TM_P_H) langhooks.h gt-function.h
 stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) flags.h \
@@ -1576,7 +1587,8 @@ integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $
    $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h gt-integrate.h
 jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
    hard-reg-set.h $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \
-   toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) $(TIMEVAR_H)
+   toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) $(TIMEVAR_H) \
+   diagnostic.h
 
 simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    $(REGS_H) hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
@@ -1595,7 +1607,7 @@ cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_
 cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_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 $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \
-   except.h $(TARGET_H)
+   except.h $(TARGET_H) $(PARAMS_H)
 gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
    hard-reg-set.h flags.h real.h insn-config.h ggc.h $(RECOG_H) $(EXPR_H) \
    $(BASIC_BLOCK_H) function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h
@@ -1641,6 +1653,8 @@ flow.o : flow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
 cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h insn-config.h \
    $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
    function.h except.h $(GGC_H) $(TM_P_H) alloc-pool.h
+cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
+   $(BASIC_BLOCK_H) cfglayout.h
 cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
    insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
    function.h except.h $(GGC_H) $(TM_P_H) insn-config.h
@@ -1761,15 +1775,15 @@ tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_
    $(PARAMS_H) $(COVERAGE_H)
 cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h \
-   function.h cfglayout.h cfgloop.h $(TARGET_H)
+   function.h cfglayout.h cfgloop.h $(TARGET_H) gt-cfglayout.h $(GGC_H)
 timevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TIMEVAR_H) flags.h \
    intl.h toplev.h
 regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(RECOG_H) function.h \
    resource.h $(OBSTACK_H) flags.h $(TM_P_H)
-ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) toplev.h \
-   flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \
-   output.h except.h $(TM_P_H) real.h
+ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+   $(REGS_H) toplev.h flags.h insn-config.h function.h $(RECOG_H) \
+   $(BASIC_BLOCK_H) $(EXPR_H) output.h except.h $(TM_P_H) real.h optabs.h
 params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) toplev.h
 hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
 
@@ -1790,7 +1804,7 @@ mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) coretypes.h $(TM_H)
 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
 
-mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) coretypes.h $(TM_H)
+mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) coretypes.h $(TM_H) version.h
 
 #\f
 # Generate header and source files from the machine description,
@@ -1968,12 +1982,12 @@ s-preds: genpreds$(build_exeext) $(srcdir)/move-if-change
        $(SHELL) $(srcdir)/move-if-change tmp-preds.h tm-preds.h
        $(STAMP) s-preds
 
-GTFILES = $(srcdir)/location.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
+GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
   $(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
   $(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h  $(srcdir)/rtl.h \
   $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
   $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h \
-  $(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/location.h \
+  $(srcdir)/cselib.h $(srcdir)/basic-block.h \
   $(srcdir)/c-common.h $(srcdir)/c-tree.h \
   $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
   $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
@@ -1981,7 +1995,7 @@ GTFILES = $(srcdir)/location.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
   $(srcdir)/fold-const.c $(srcdir)/function.c \
   $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
   $(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \
-  $(srcdir)/reg-stack.c \
+  $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
   $(srcdir)/sdbout.c $(srcdir)/stmt.c $(srcdir)/stor-layout.c \
   $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
   $(out_file) \
@@ -1999,7 +2013,7 @@ gt-lists.h gt-alias.h gt-cselib.h gt-fold-const.h gt-gcse.h \
 gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h \
 gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
 gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
-gt-c-pragma.h gt-c-objc-common.h gtype-c.h gt-location.h \
+gt-c-pragma.h gt-c-objc-common.h gtype-c.h gt-input.h gt-cfglayout.h \
 gt-stringpool.h : s-gtype ; @true
 
 gtyp-gen.h: Makefile
@@ -2326,7 +2340,7 @@ PREPROCESSOR_DEFINES = \
 
 LIBCPP_OBJS =  cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o cpptrad.o \
                cpphash.o cpperror.o cppinit.o cppcharset.o \
-               hashtable.o line-map.o mkdeps.o mbchar.o cpppch.o
+               hashtable.o line-map.o mkdeps.o cpppch.o
 
 LIBCPP_DEPS =  $(CPPLIB_H) cpphash.h line-map.h hashtable.h intl.h \
                $(OBSTACK_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
@@ -2341,7 +2355,7 @@ libcpp.a: $(LIBCPP_OBJS)
 cppcharset.o: cppcharset.c $(LIBCPP_DEPS)
 cpperror.o: cpperror.c $(LIBCPP_DEPS)
 cppexp.o:   cppexp.c   $(LIBCPP_DEPS)
-cpplex.o:   cpplex.c   $(LIBCPP_DEPS) mbchar.h
+cpplex.o:   cpplex.c   $(LIBCPP_DEPS)
 cppmacro.o: cppmacro.c $(LIBCPP_DEPS)
 cpplib.o:   cpplib.c   $(LIBCPP_DEPS)
 cpphash.o:  cpphash.c  $(LIBCPP_DEPS)
@@ -2432,11 +2446,14 @@ gcov-iov.o: gcov-iov.c version.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) c
        $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(srcdir)/gcov-iov.c $(OUTPUT_OPTION)
 gcov-iov$(build_exeext): gcov-iov.o
        $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) gcov-iov.o -o $@
-gcov-iov.h: gcov-iov$(build_exeext)
-       ./gcov-iov$(build_exeext) > $@
+gcov-iov.h: s-iov
+s-iov: gcov-iov$(build_exeext) $(srcdir)/move-if-change
+       ./gcov-iov$(build_exeext) > tmp-gcov-iov.h
+       $(SHELL) $(srcdir)/move-if-change tmp-gcov-iov.h gcov-iov.h
+       $(STAMP) s-iov
 
-gcov.o: gcov.c gcov-io.h gcov-iov.h intl.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
-gcov-dump.o: gcov-dump.c gcov-io.h gcov-iov.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
+gcov.o: gcov.c gcov-io.h gcov-io.c gcov-iov.h intl.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
+gcov-dump.o: gcov-dump.c gcov-io.h gcov-io.c gcov-iov.h $(SYSTEM_H) coretypes.h $(TM_H) $(CONFIG_H)
 
 # Only one of 'gcov' or 'gcov.exe' is actually built, depending
 # upon whether $(exeext) is empty or not.
@@ -2502,7 +2519,7 @@ fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \
        WARN_CFLAGS="$(WARN_CFLAGS)"; LIBERTY=`pwd`/"$(BUILD_LIBIBERTY)"; \
        export MAKE srcdir CC CFLAGS LDFLAGS WARN_CFLAGS LIBERTY; \
        cd ./fixinc && \
-       $(SHELL) $${srcdir}/mkfixinc.sh $(build_canonical) $(target))
+       $(SHELL) $${srcdir}/mkfixinc.sh $(build) $(target))
 
 .PHONY: install-gcc-tooldir
 install-gcc-tooldir:
@@ -2626,7 +2643,7 @@ TEXI_GCC_FILES = $(docdir)/gcc.texi $(docdir)/include/gcc-common.texi \
         $(docdir)/invoke.texi $(docdir)/extend.texi $(docdir)/md.texi \
         $(docdir)/objc.texi $(docdir)/gcov.texi $(docdir)/trouble.texi \
         $(docdir)/bugreport.texi $(docdir)/service.texi \
-        $(docdir)/contribute.texi $(docdir)/vms.texi $(docdir)/compat.texi \
+        $(docdir)/contribute.texi $(docdir)/compat.texi \
         $(docdir)/include/funding.texi $(docdir)/gnu.texi \
         $(docdir)/include/gpl.texi $(docdir)/include/fdl.texi \
         $(docdir)/contrib.texi $(docdir)/cppenv.texi $(docdir)/cppopts.texi
@@ -2771,7 +2788,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
        -rm -f xlimits.h
 # Delete other built files.
        -rm -f xsys-protos.hT
-       -rm -f specs.h options.h gencheck.h
+       -rm -f specs.h options_.h gencheck.h c-options.c c-options.h
 # Delete the stamp and temporary files.
        -rm -f s-* tmp-* stamp-* stmp-*
        -rm -f */stamp-* */tmp-*
@@ -2819,7 +2836,7 @@ clean: mostlyclean $(INTL_CLEAN) lang.clean
        else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
          rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
        fi ; fi
-       -rm -fr stage1 stage2 stage3 stage4
+       -rm -fr stage1 stage2 stage3 stage4 stageprofile stagefeedback
 # Delete stamps of bootstrap stages
        -rm -f stage?_*
        -rm -f clean?_*
@@ -2835,7 +2852,7 @@ distclean: clean $(INTL_DISTCLEAN) lang.distclean
        -rm -f Make-lang Make-hooks Make-host Make-target
        -rm -f Makefile *.oaux
        -rm -f gthr-default.h
-       -rm -f */stage1 */stage2 */stage3 */stage4 */include
+       -rm -f */stage1 */stage2 */stage3 */stage4 */include */stageprofile */stagefeedback
        -rm -f c-parse.output
        -rm -f *.asm
        -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
@@ -2976,7 +2993,7 @@ install-common: native $(EXTRA_PARTS) lang.install-common
 # Install gcov if it was compiled.
        -if [ -f gcov$(exeext) ]; \
        then \
-           rm -f $(DESTDIR)$(bindir)/gcov$(exeext); \
+           rm -f $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
            $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
        fi
        $(INSTALL_SCRIPT) gccbug $(DESTDIR)$(bindir)/$(GCCBUG_INSTALL_NAME)
@@ -3216,7 +3233,7 @@ uninstall: intl.uninstall lang.uninstall
 # These targets are for the dejagnu testsuites. The file site.exp
 # contains global variables that all the testsuites will use.
 
-# Set to $(target_alias)/ for cross.
+# Set to $(target_alias).
 target_subdir = @target_subdir@
 
 site.exp: ./config.status Makefile
@@ -3229,8 +3246,8 @@ site.exp: ./config.status Makefile
        @echo "# add them to the last section" >> ./tmp0
        @echo "set rootme \"`${PWD}`\"" >> ./tmp0
        @echo "set srcdir \"`cd ${srcdir}; ${PWD}`\"" >> ./tmp0
-       @echo "set host_triplet $(host_canonical)" >> ./tmp0
-       @echo "set build_triplet $(build_canonical)" >> ./tmp0
+       @echo "set host_triplet $(host)" >> ./tmp0
+       @echo "set build_triplet $(build)" >> ./tmp0
        @echo "set target_triplet $(target)" >> ./tmp0
        @echo "set target_alias $(target_alias)" >> ./tmp0
 # CFLAGS is set even though it's empty to show we reserve the right to set it.
@@ -3247,9 +3264,10 @@ site.exp: ./config.status Makefile
 # ??? Another way to solve this might be to rely on linker scripts.  Then
 # theoretically the -B won't be needed.
 # We also need to pass -L ../ld so that the linker can find ldscripts.
-       @if [ -d $(objdir)/../$(target_subdir)newlib ] ; then \
-         echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
-         echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)newlib/\"" >> ./tmp0; \
+       @if [ -d $(objdir)/../$(target_subdir)/newlib ] \
+           && [ "${host}" != "${target}" ]; then \
+         echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)/newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
+         echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)/newlib/\"" >> ./tmp0; \
          echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
          echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
          echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
@@ -3261,12 +3279,16 @@ site.exp: ./config.status Makefile
        fi
        echo "set tmpdir $(objdir)/testsuite" >> ./tmp0
        @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
+       @if [ "X$(ALT_CC_UNDER_TEST)" != "X" ] ; then \
+         echo "set ALT_CC_UNDER_TEST \"$(ALT_CC_UNDER_TEST)\"" >> ./tmp0; \
+       else true; \
+       fi
        @if [ "X$(ALT_CXX_UNDER_TEST)" != "X" ] ; then \
-         echo "set ALT_CXX_UNDER_TEST $(ALT_CXX_UNDER_TEST)" >> ./tmp0; \
+         echo "set ALT_CXX_UNDER_TEST \"$(ALT_CXX_UNDER_TEST)\"" >> ./tmp0; \
        else true; \
        fi
        @if [ "X$(COMPAT_OPTIONS)" != "X" ] ; then \
-         echo "set COMPAT_OPTIONS $(COMPAT_OPTIONS)" >> ./tmp0; \
+         echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./tmp0; \
        else true; \
        fi
        @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
@@ -3362,13 +3384,13 @@ QMTEST_PATH=qmtest
 QMTESTFLAGS=
 
 # The flags to pass to "qmtest run".
-QMTESTRUNFLAGS=
+QMTESTRUNFLAGS=-f none --result-stream dejagnu_stream.DejaGNUStream
 
 # The command to use to invoke qmtest.
 QMTEST=${QMTEST_PATH} ${QMTESTFLAGS}
 
 # The tests (or suites) to run.
-QMTEST_GPP_TESTS=gpp
+QMTEST_GPP_TESTS=g++
 
 # The subdirectory of the OBJDIR that will be used to store the QMTest
 # test database configuration and that will be used for temporary
@@ -3377,48 +3399,32 @@ QMTEST_DIR=qmtestsuite
 
 # Create the QMTest database configuration.
 ${QMTEST_DIR} stamp-qmtest:
-       debug_options=""; \
-           ${STAMP} empty.C; \
-           for option in \
-               -gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff; do \
-               (./cc1plus -q $${option} empty.C 2>&1 | \
-                    grep "unknown or unsupported -g option" > /dev/null) || \
-               debug_options="$${debug_options}$${option} "; done; \
-           ${QMTEST} -D ${QMTEST_DIR} create-tdb \
-               -c gcc_database.GCCDatabase \
-               -a GCCDatabase.testsuite_root=`cd ${srcdir}/testsuite && pwd` \
-               -a GCCDatabase.debug_options="$${debug_options}"
-       rm -f empty.C empty.s
-       $(STAMP) stamp-qmtest
+       ${QMTEST} -D ${QMTEST_DIR} create-tdb \
+           -c gcc_database.GCCDatabase \
+            -a srcdir=`cd ${srcdir}/testsuite && pwd` && \
+           $(STAMP) stamp-qmtest
 
 # Create the QMTest context file.
 ${QMTEST_DIR}/context: stamp-qmtest
-       echo "GCCTest.flags=-B${objdir}" >> $@
-       echo "GCCTest.objdir=${objdir}/.." >> $@
-       echo "GCCTest.host=${host_canonical}" >> $@
-       echo "GCCTest.target=${target}" >> $@
-       echo "GCCTest.gcov=${objdir}/gcov" >> $@
-       echo "GPPTest.gpp=${objdir}/g++" >> $@
-       echo "DGTest.demangler=${objdir}/c++filt" >> $@
+       rm -f $@
+       echo "CompilerTable.languages=c cplusplus" >> $@
+       echo "CompilerTable.c_kind=GCC" >> $@
+       echo "CompilerTable.c_path=${objdir}/xgcc" >> $@
+       echo "CompilerTable.c_options=-B${objdir}/" >> $@
+       echo "CompilerTable.cplusplus_kind=GCC" >> $@
+       echo "CompilerTable.cplusplus_path=${objdir}/g++" >> $@
+       echo "CompilerTable.cplusplus_options=-B${objdir}/" >> $@
+       echo "DejaGNUTest.target=${target_alias}" >> $@
 
 # Run the G++ testsuite using QMTest.
-qmtest-g++: ${QMTEST_DIR}/context ${QMTEST_DIR}/gpp-expected.qmr
+qmtest-g++: ${QMTEST_DIR}/context
        cd ${QMTEST_DIR} && ${QMTEST} run ${QMTESTRUNFLAGS} -C context \
-          -o gpp.qmr -O gpp-expected.qmr \
-          ${QMTEST_GPP_TESTS}
+          -o g++.qmr ${QMTEST_GPP_TESTS}
 
 # Use the QMTest GUI.
 qmtest-gui: ${QMTEST_DIR}/context
        cd ${QMTEST_DIR} && ${QMTEST} gui -C context
 
-# Build the set of expected G++ failures.
-${QMTEST_DIR}/gpp-expected.qmr: ${QMTEST_DIR}/context
-       echo "Determining expected results..."
-       cd ${QMTEST_DIR} && ${QMTEST} run ${QMTESTRUNFLAGS} -C context \
-           -c "GCCTest.generate_xfails=1" -o gpp-expected.qmr \
-          ${QMTEST_GPP_TESTS} \
-          > /dev/null
-
 .PHONY: qmtest-g++
 
 # Run Paranoia on real.c.
@@ -3453,19 +3459,31 @@ VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*`
 # Flags to pass to stage2 and later recursive makes.  Note that the
 # WARN_CFLAGS setting can't be to the expansion of GCC_WARN_CFLAGS in
 # the context of the stage_x rule.
-STAGE2_FLAGS_TO_PASS = \
+
+POSTSTAGE1_FLAGS_TO_PASS = \
        ADAC="\$$(CC)" \
        GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
        CFLAGS="$(BOOT_CFLAGS)" \
        LDFLAGS="$(BOOT_LDFLAGS)" \
        WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \
-       WERROR="@WERROR@" \
        STRICT_WARN="$(STRICT2_WARN)" \
        libdir=$(libdir) \
        LANGUAGES="$(LANGUAGES)" \
        MAKEOVERRIDES= \
        OUTPUT_OPTION="-o \$$@"
 
+STAGE2_FLAGS_TO_PASS = \
+       CFLAGS="$(BOOT_CFLAGS)" \
+       WERROR="@WERROR@" \
+
+STAGEPROFILE_FLAGS_TO_PASS = \
+       CFLAGS="$(BOOT_CFLAGS) -fprofile-arcs" 
+
+# Files never linked into the final executable produces warnings about missing
+# profile.
+STAGEFEEDBACK_FLAGS_TO_PASS = \
+       CFLAGS="$(BOOT_CFLAGS) -fbranch-probabilities" 
+
 # 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. STAGE1_CFLAGS (via CFLAGS),
@@ -3485,8 +3503,9 @@ stage1_copy: stage1_build
        echo stage2_build > stage_last
 
 stage2_build: stage1_copy
-       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
+       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
                 STAGE_PREFIX=stage1/ \
+                $(POSTSTAGE1_FLAGS_TO_PASS) \
                 $(STAGE2_FLAGS_TO_PASS)
        $(STAMP) stage2_build
        echo stage2_build > stage_last
@@ -3496,13 +3515,40 @@ stage2_copy: stage2_build
        $(STAMP) stage2_copy
        echo stage3_build > stage_last
 
+stageprofile_build: stage1_copy
+       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
+                STAGE_PREFIX=stage1/ \
+                $(POSTSTAGE1_FLAGS_TO_PASS) \
+                $(STAGEPROFILE_FLAGS_TO_PASS)
+       $(STAMP) stageprofile_build
+       echo stageprofile_build > stage_last
+
+stageprofile_copy: stageprofile_build
+       $(MAKE) stageprofile
+       $(STAMP) stageprofile_copy
+       echo stagefeedback_build > stage_last
+
 stage3_build: stage2_copy
-       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \
+       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage2/xgcc$(exeext) -Bstage2/ -B$(build_tooldir)/bin/" \
                 STAGE_PREFIX=stage2/ \
+                $(POSTSTAGE1_FLAGS_TO_PASS) \
                 $(STAGE2_FLAGS_TO_PASS)
        $(STAMP) stage3_build
        echo stage3_build > stage_last
 
+stagefeedback_build: stageprofile_copy stage1_copy
+       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage1/xgcc$(exeext) -Bstage1/ -B$(build_tooldir)/bin/" \
+                STAGE_PREFIX=stage1/ \
+                $(POSTSTAGE1_FLAGS_TO_PASS) \
+                $(STAGEFEEDBACK_FLAGS_TO_PASS)
+       $(STAMP) stagefeedback_build
+       echo stagefeedback_build > stage_last
+
+stagefeedback_copy: stagefeedback_build
+       $(MAKE) stagefeedback
+       $(STAMP) stagefeedback_copy
+       echo stagefeedback2_build > stage_last
+
 # For bootstrap4:
 stage3_copy: stage3_build
        $(MAKE) stage3
@@ -3510,8 +3556,9 @@ stage3_copy: stage3_build
        echo stage4_build > stage_last
 
 stage4_build: stage3_copy
-       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \
+       $(MAKE) CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" BUILD_CC="$(STAGE_CC_WRAPPER) stage3/xgcc$(exeext) -Bstage3/ -B$(build_tooldir)/bin/" \
                 STAGE_PREFIX=stage3/ \
+                $(POSTSTAGE1_FLAGS_TO_PASS) \
                 $(STAGE2_FLAGS_TO_PASS)
        $(STAMP) stage4_build
        echo stage4_build > stage_last
@@ -3547,7 +3594,7 @@ bootstrap3 bootstrap3-lean: bootstrap
 
 bootstrap4 bootstrap4-lean: stage4_build
 
-unstage1 unstage2 unstage3 unstage4:
+unstage1 unstage2 unstage3 unstage4 unstageprofile unstagefeedback:
        -set -vx; stage=`echo $@ | sed -e 's/un//'`; \
        rm -f $$stage/as$(exeext); \
        rm -f $$stage/ld$(exeext); \
@@ -3578,6 +3625,12 @@ restage3: unstage3
 restage4: unstage4
        $(MAKE) LANGUAGES="$(LANGUAGES)" stage4_build
 
+restageprofile: unstageprofile
+       $(MAKE) LANGUAGES="$(LANGUAGES)" stageprofile_build
+
+restagefeedback: unstagefeedback
+       $(MAKE) LANGUAGES="$(LANGUAGES)" stagefeedback_build
+
 bubblestrap:
        if test -f stage3_build; then true; else \
          echo; echo You must \"make bootstrap\" first.; \
@@ -3593,7 +3646,7 @@ bubblestrap:
 
 quickstrap:
        if test -f stage_last ; then \
-         LAST=`cat stage_last`; rm $$LAST; $(MAKE) LANGUAGES="$(LANGUAGES)" $$LAST; \
+         LAST=`cat stage_last`; rm $$LAST; $(MAKE) BOOT_CFLAGS="$(BOOT_CFLAGS)" LANGUAGES="$(LANGUAGES)" $$LAST; \
        else \
          $(MAKE) stage1_build; \
        fi
@@ -3603,8 +3656,9 @@ cleanstrap:
        $(MAKE) LANGUAGES="$(LANGUAGES)" bootstrap
 
 unstrap:
-       -rm -rf stage[234]* stage_last
+       -rm -rf stage[234]*
        $(MAKE) unstage1
+       -rm -f stage_last
 
 # Differs from cleanstrap in that it starts from the earlier stage1 build,
 # not from scratch.
@@ -3614,17 +3668,16 @@ restrap:
 
 # Compare the object files in the current directory with those in the
 # stage2 directory.
-
 # ./ avoids bug in some versions of tail.
-compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
+slowcompare slowcompare3 slowcompare4 slowcompare-lean slowcompare3-lean slowcompare4-lean: force
        -rm -f .bad_compare
-       case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
+       case "$@" in slowcompare | slowcompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^slowcompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
        for file in *$(objext); do \
          tail +16c ./$$file > tmp-foo1; \
          tail +16c stage$$stage/$$file > tmp-foo2 \
            && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
        done
-       case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
+       case "$@" in slowcompare | slowcompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^slowcompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
        for dir in tmp-foo intl $(SUBDIRS); do \
          if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
            for file in $$dir/*$(objext); do \
@@ -3635,7 +3688,7 @@ compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
          else true; fi; \
        done
        -rm -f tmp-foo*
-       case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
+       case "$@" in slowcompare | slowcompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^slowcompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
        if [ -f .bad_compare ]; then \
          echo "Bootstrap comparison failure!"; \
          cat .bad_compare; \
@@ -3679,6 +3732,14 @@ gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-
          esac; true; \
        fi
 
+# Forwarding wrappers to the most appropriate version.
+compare: @make_compare_target@
+compare3: @make_compare_target@3
+compare4: @make_compare_target@4
+compare-lean: @make_compare_target@-lean
+compare3-lean: @make_compare_target@3-lean
+compare4-lean: @make_compare_target@4-lean
+
 # Copy the object files from a particular stage into a subdirectory.
 stage1-start:
        -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
@@ -3804,6 +3865,63 @@ stage4-start:
        fi; done
 stage4: force stage4-start lang.stage4
 
+stageprofile-start:
+       -if [ -d stageprofile ] ; then true ; else mkdir stageprofile ; fi
+       $(MAKE) -f libgcc.mk libgcc-stage-start stage=stageprofile
+       -for dir in intl $(SUBDIRS) ; \
+        do \
+          if [ -d stageprofile/$$dir ] ; then true ; else mkdir stageprofile/$$dir ; fi ; \
+        done
+       -mv $(STAGESTUFF) stageprofile
+       -mv intl/*$(objext) stageprofile/intl
+# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
+# dir will work properly.
+       -if [ -f as$(exeext) ] ; then (cd stageprofile && $(LN_S) ../as$(exeext) .) ; else true ; fi
+       -if [ -f ld$(exeext) ] ; then (cd stageprofile && $(LN_S) ../ld$(exeext) .) ; else true ; fi
+       -if [ -f collect-ld$(exeext) ] ; then (cd stageprofile && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
+       -rm -f stageprofile/libgcc.a stageprofile/libgcov.a stageprofile/libgcc_eh.a
+       -cp libgcc.a stageprofile
+       -$(RANLIB_FOR_TARGET) stageprofile/libgcc.a
+       -cp libgcov.a stageprofile
+       -$(RANLIB_FOR_TARGET) stageprofile/libgcov.a
+       -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stageprofile; \
+          $(RANLIB_FOR_TARGET) stageprofile/libgcc_eh.a; \
+       fi
+       -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
+         cp stageprofile/$${f} . ; \
+       else true; \
+       fi; done
+stageprofile: force stageprofile-start lang.stageprofile
+
+stagefeedback-start:
+       -if [ -d stagefeedback ] ; then true ; else mkdir stagefeedback ; fi
+       $(MAKE) -f libgcc.mk libgcc-stage-start stage=stagefeedback
+       -for dir in intl $(SUBDIRS) ; \
+        do \
+          if [ -d stagefeedback/$$dir ] ; then true ; else mkdir stagefeedback/$$dir ; fi ; \
+        done
+       -mv $(STAGESTUFF) stagefeedback
+       -mv intl/*$(objext) stagefeedback/intl
+# Copy as/ld if they exist to stage dir, so that running xgcc from the stage
+# dir will work properly.
+       -if [ -f as$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../as$(exeext) .) ; else true ; fi
+       -if [ -f ld$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../ld$(exeext) .) ; else true ; fi
+       -if [ -f collect-ld$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
+       -rm -f stagefeedback/libgcc.a stagefeedback/libgcov.a stagefeedback/libgcc_eh.a
+       -rm -f *.da ada/*.da cp/*.da f/*.da java/*.da objc/*.da fixinc/*.da intl po testsuite 2>/dev/null
+       -cp libgcc.a stagefeedback
+       -$(RANLIB_FOR_TARGET) stagefeedback/libgcc.a
+       -cp libgcov.a stagefeedback
+       -$(RANLIB_FOR_TARGET) stagefeedback/libgcov.a
+       -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stagefeedback; \
+          $(RANLIB_FOR_TARGET) stagefeedback/libgcc_eh.a; \
+       fi
+       -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
+         cp stagefeedback/$${f} . ; \
+       else true; \
+       fi; done
+stagefeedback: force stagefeedback-start lang.stagefeedback
+
 # Copy just the executable files from a particular stage into a subdirectory,
 # and delete the object files.  Use this if you're just verifying a version
 # that is pretty sure to work, and you are short of disk space.
@@ -3822,6 +3940,7 @@ risky-stage4: stage4
 #In GNU Make, ignore whether `stage*' exists.
 .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
 .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
+.PHONY: stagefeedback stageprofile
 
 # Rules for generating translated message descriptions.
 # Disabled by autoconf if the tools are not available.