This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] Fix unified tree breakage
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- Cc: Paolo Bonzini <bonzini at gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, newlib at sourceware dot org, binutils at sources dot redhat dot com
- Date: Wed, 05 Oct 2005 16:06:23 +0200
- Subject: [PATCH] Fix unified tree breakage
- References: <1128520119.5300.8.camel@pc960.cambridge.arm.com>
Restarting the make after binutils has been built should work ok, but
that's not really the point.
The attached patch should fix it.
With the patch, we get this sequence for bootstrap:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if [ ! -f stage_last ]; then \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) bootstrap; \
fi
@$(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-target
@$(stage)
for GCC, no bootstrap:
@$(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-target
@$(stage)
And for no GCC:
@$(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-target
@$(stage)
Richard, does it work for you?
Paolo
2005-10-05 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (all) [gcc-no-bootstrap]: Make prebootstrap packages
before other host packages. Do not use stage_last to find the
flags to pass to all-host.
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.143
diff -p -u -u -r1.143 Makefile.tpl
--- Makefile.tpl 5 Oct 2005 07:32:13 -0000 1.143
+++ Makefile.tpl 5 Oct 2005 13:56:11 -0000
@@ -709,13 +709,19 @@ all:
fi
@endif gcc-bootstrap
@$(unstage)
+@if gcc-no-bootstrap
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if [ -f stage_last ]; then \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host; \
- else \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host; \
- fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
+@endif gcc-no-bootstrap
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+@if gcc-bootstrap
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host
+@endif gcc-bootstrap
+@if gcc-no-bootstrap
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host
+@endif gcc-no-bootstrap
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-target