This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Toplevel bootstrap patches cause bootstrap breakage
On Tue, Feb 21, 2006 at 02:16:27PM -0500, Daniel Jacobowitz wrote:
> On Tue, Feb 21, 2006 at 01:50:47PM -0500, David Edelsohn wrote:
> > if [ -d ../prev-gcc ]; then \
> > cd ../prev-gcc && \
> > make install-headers-tar DESTDIR=`pwd`/../gcc/ \
> > libsubdir=. ; \
> > else \
>
> That's the problem.
>
> Paolo, we can't run make targets inside prev-gcc. install-headers-tar
> has dependencies; one of them must go all the way back to xgcc (not
> surprising), and moving gcc and prev-gcc around means that xgcc
> will need to be rebuilt, probably because it is now older than the
> headers in prev-gcc.
>
> I think that either we need a variant of install-headers-tar with no
> dependencies to do this, or find some other way entirely.
Want to try this?
--
Daniel Jacobowitz
CodeSourcery
Index: Makefile.in
===================================================================
--- Makefile.in (revision 111338)
+++ Makefile.in (working copy)
@@ -3195,7 +3195,7 @@
-chmod a+rx include
if [ -d ../prev-gcc ]; then \
cd ../prev-gcc && \
- $(MAKE) $(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
+ $(MAKE) real-$(INSTALL_HEADERS_DIR) DESTDIR=`pwd`/../gcc/ \
libsubdir=. ; \
else \
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
@@ -3789,6 +3789,18 @@
install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
cp -p -r include $(DESTDIR)$(libsubdir)
+# Targets without dependencies, for use in prev-gcc during bootstrap.
+real-install-headers-tar:
+ (cd `${PWD_COMMAND}`/include ; \
+ tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
+
+real-install-headers-cpio:
+ cd `${PWD_COMMAND}`/include ; \
+ find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include
+
+real-install-headers-cp:
+ cp -p -r include $(DESTDIR)$(libsubdir)
+
# Install supporting files for fixincludes to be run later.
install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-itoolsdirs \
macro_list xlimits.h