OSDN Git Service

* config/i386/i386.c (legitimate_constant_p): Handle UNSPEC_NTPOFF
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
index 76d2c8d..bd84122 100644 (file)
@@ -59,8 +59,8 @@ 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@
 
@@ -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 ; \
@@ -635,7 +635,7 @@ PARAMS_H = params.h params.def
 TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def \
           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
@@ -1316,15 +1317,15 @@ c-pretty-print.o : c-pretty-print.c c-pretty-print.h pretty-print.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) c-options.h c-options.c
+       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
-       AWK=$(AWK) $(SHELL) $(srcdir)/opts.sh c-options.c c-options.h $(srcdir)/c.opt
+c-options.c: c.opt $(srcdir)/opts.sh c-options.h
 
-c-options.h: c-options.c
-       @true
+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 \
@@ -1404,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
@@ -1479,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)\" \
@@ -1650,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
@@ -1770,7 +1775,7 @@ 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) \
@@ -1990,7 +1995,7 @@ GTFILES = $(srcdir)/input.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) \
@@ -2008,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-input.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
@@ -2514,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:
@@ -2783,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 c-options.c c-options.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-*
@@ -2831,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?_*
@@ -2847,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
@@ -2988,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)
@@ -3228,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
@@ -3241,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.
@@ -3259,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; \
@@ -3408,7 +3414,7 @@ ${QMTEST_DIR}/context: stamp-qmtest
        echo "CompilerTable.cplusplus_kind=GCC" >> $@
        echo "CompilerTable.cplusplus_path=${objdir}/g++" >> $@
        echo "CompilerTable.cplusplus_options=-B${objdir}/" >> $@
-       echo "DejaGNUTest.target=$(target)" >> $@
+       echo "DejaGNUTest.target=${target_alias}" >> $@
 
 # Run the G++ testsuite using QMTest.
 qmtest-g++: ${QMTEST_DIR}/context
@@ -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),
@@ -3487,6 +3505,7 @@ stage1_copy: stage1_build
 stage2_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) \
                 $(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/" 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
@@ -3512,6 +3558,7 @@ stage3_copy: stage3_build
 stage4_build: stage3_copy
        $(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.; \
@@ -3812,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.
@@ -3830,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.