OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / Makefile.tpl
index 2c114e4..2a8b2ef 100644 (file)
@@ -586,7 +586,6 @@ EXTRA_GCC_FLAGS = \
        'BUILD_PREFIX=$(BUILD_PREFIX)' \
        'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
        "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
-       "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
        "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
        "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
        "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
@@ -1320,7 +1319,7 @@ objext = .o
 # Flags to pass to stage2 and later makes.
 POSTSTAGE1_FLAGS_TO_PASS = \
        CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
-       STAGE_PREFIX=$$r/stage[+prev+]-gcc/ \
+       STAGE_PREFIX=$$r/prev-gcc/ \
        CFLAGS="$(BOOT_CFLAGS)" \
        ADAC="\$$(CC)"
 
@@ -1340,7 +1339,7 @@ stage[+id+]-start::
        @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        echo stage[+id+] > stage_current ; \
        echo stage[+id+] > stage_last; \
-       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)[+
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)[+
    FOR host_modules +][+ IF bootstrap +]
 @if [+ module +]
        @cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
@@ -1349,7 +1348,16 @@ stage[+id+]-start::
        @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \
        set stage[+prev+]-[+module+] prev-[+module+] ; \
        @CREATE_LINK_TO_DIR@ [+ ENDIF prev +]
-@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+
+   FOR target_modules +][+ IF bootstrap +]
+@if target-[+ module +]
+       @cd $(TARGET_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
+         mkdir stage[+id+]-[+module+]; \
+       set stage[+id+]-[+module+] [+module+] ; \
+       @CREATE_LINK_TO_DIR@ [+ IF prev +] ; \
+       set stage[+prev+]-[+module+] prev-[+module+] ; \
+       @CREATE_LINK_TO_DIR@ [+ ENDIF prev +]
+@endif target-[+ module +][+ ENDIF bootstrap +][+ ENDFOR target_modules +]
 
 stage[+id+]-end::
        @rm -f stage_current[+ FOR host_modules +][+ IF bootstrap +]
@@ -1358,7 +1366,14 @@ stage[+id+]-end::
        @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \
        set prev-[+module+] stage[+prev+]-[+module+] ; \
        @UNDO_LINK_TO_DIR@ [+ ENDIF prev +]
-@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
+@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +][+
+   FOR target_modules +][+ IF bootstrap +]
+@if target-[+ module +]
+       @cd $(HOST_SUBDIR); set [+module+] stage[+id+]-[+module+] ; \
+       @UNDO_LINK_TO_DIR@ [+ IF prev +] ; \
+       set prev-[+module+] stage[+prev+]-[+module+] ; \
+       @UNDO_LINK_TO_DIR@ [+ ENDIF prev +]
+@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR target_modules +]
 
 # Bubble a bugfix through all the stages up to stage [+id+].  They
 # are remade, but not reconfigured.  The next stage (if any) will not
@@ -1429,32 +1444,18 @@ distclean-stage[+id+]::
 
 [+ ENDFOR bootstrap-stage +]
 
-stagefeedback-start::
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       cd stageprofile-gcc && \
-         { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
-         { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
+stageprofile-end::
+       $(MAKE) distclean-stagefeedback
 
-# FIXME: Will not need to be conditional when toplevel bootstrap is the
-# only possibility, but now it conflicts with no-bootstrap rules
-@if gcc-bootstrap
-profiledbootstrap:
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(HOST_EXPORTS) \
-       echo "Bootstrapping the compiler"; \
-       $(MAKE) stageprofile-bubble distclean-stagefeedback
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
-       echo "Building runtime libraries and training compiler"; \
-       $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+stagefeedback-start::
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(HOST_EXPORTS) \
-       echo "Building feedback based compiler"; \
-       $(MAKE) stagefeedback-bubble stagefeedback-end
-@endif gcc-bootstrap
+       for i in prev-*; do \
+         j=`echo $$i | sed s/^prev-//` ; \
+         cd $$r/$$i && \
+         { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
+         { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
+       done
 
 @if gcc-bootstrap
 NOTPARALLEL = .NOTPARALLEL
@@ -1467,7 +1468,10 @@ do-distclean: distclean-stage1
 # --------------------------------------
 
 # Generic dependencies for target modules on host stuff, especially gcc
-[+ FOR target_modules +]
+[+ FOR target_modules +][+ IF bootstrap +]
+@if gcc-bootstrap[+ FOR bootstrap_stage +]
+configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+ ENDFOR +]
+@endif gcc-bootstrap[+ ENDIF bootstrap +]
 configure-target-[+module+]: maybe-all-gcc
 [+ ENDFOR target_modules +]
 
@@ -1535,7 +1539,6 @@ configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
          "prebootstrap"
 
          (if (or (= (dep-subtarget "on") "install-")
-                 (=* (dep-module "on") "target-")
                  (not (hash-ref boot-modules (dep-module "module")))
                  (not (hash-ref boot-modules (dep-module "on"))))
               "normal"
@@ -1549,6 +1552,10 @@ configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
    (if (exist? "bootstrap")
        (hash-create-handle! boot-modules (get "module") #t))
    "" +][+ ENDFOR host_modules +]
+[+ FOR target_modules +][+
+   (if (exist? "bootstrap")
+       (hash-create-handle! boot-modules (string-append "target-" (get "module")) #t))
+   "" +][+ ENDFOR target_modules +]
 
 # With all the machinery above in place, it is pretty easy to generate
 # dependencies.  Host dependencies are a bit more complex because we have