From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29071 invoked by alias); 25 Mar 2008 20:25:17 -0000 Received: (qmail 29009 invoked by uid 22791); 25 Mar 2008 20:25:16 -0000 X-Spam-Check-By: sourceware.org Received: from merkur.ins.uni-bonn.de (HELO merkur.ins.uni-bonn.de) (131.220.223.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Mar 2008 20:24:33 +0000 Received: from localhost.localdomain (xdsl-87-78-111-135.netcologne.de [87.78.111.135]) by merkur.ins.uni-bonn.de (Postfix) with ESMTP id 6D08340000493; Tue, 25 Mar 2008 21:24:30 +0100 (CET) Received: from ralf by localhost.localdomain with local (Exim 4.63) (envelope-from ) id 1JeFh3-0004Z1-MK; Tue, 25 Mar 2008 21:24:25 +0100 Date: Tue, 25 Mar 2008 20:41:00 -0000 From: Ralf Wildenhues To: Tom Tromey Cc: Paolo Bonzini , Gcc Patch List Subject: Re: Patch: automatic dependencies for gcc Message-ID: <20080325202425.GD18200@ins.uni-bonn.de> Mail-Followup-To: Ralf Wildenhues , Tom Tromey , Paolo Bonzini , Gcc Patch List References: <47DFCB97.1000908@gnu.org> <47E3E979.7020904@gnu.org> <47E89A0C.50607@gnu.org> <47E91C7E.8060506@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg01528.txt.bz2 * Tom Tromey wrote on Tue, Mar 25, 2008 at 04:35:48PM CET: > > Naturally, if there are problems, let me know and I will fix them. > +++ gcc/doc/install.texi (working copy) > @@ -285,7 +285,7 @@ > Necessary to uncompress GCC @command{tar} files when source code is > obtained via FTP mirror sites. > > -@item GNU make version 3.79.1 (or later) > +@item GNU make version 3.80 (or later) Do you check this at build time? Hmm, .FEATURES is available as of 3.81 only, otherwise you could check that for presence of 'order-only'. It seems that 3.79.1 errors out when it sees '|' in dependencies, so I guess there is no problem concerning silent failure. > +++ gcc/Makefile.in (working copy) [...] > @@ -904,9 +847,17 @@ > -I$(srcdir)/../include @INCINTL@ \ > $(CPPINC) $(GMPINC) $(DECNUMINC) > > -.c.o: > - $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) > +COMPILE.base = $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -o $@ > +ifeq ($(DEPMODE),depmode=gcc3) > +COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF $(*D)/$(DEPDIR)/$(*F).Po I forgot one more thing here. If gcc is interrupted, it may leave an incomplete dependency file here, which can lead to make erroring out next time (make won't remove the .Po file upon interrupt, as it's not listed as target). You could use $(*D)/$(DEPDIR)/$(*F).Tpo and a subsequent mv to *.Po as automake does. Even if there were an easy way to write something like %.o %.Po: %.c then make wouldn't remove the .Po file after a kill or quit signal. Same holds for BUILDCOMPILE, of course. depcomp already takes care of atomicity for the case DEPMODE != gcc3. BTW, should I file a bug report about -MF not being atomic? > +else > +COMPILE = source='$<' object='$@' libtool=no \ > + DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(COMPILE.base) > +endif > > +%.o: %.c > + $(COMPILE) $< Another thing: have you tried a parallel (make -jN) build with this on a multi-way system? Yet another thing: you removed this from objcp/Make-lang.in: > +++ gcc/objcp/Make-lang.in (working copy) [...] > -# The following must be an explicit rule; please keep in sync with the implicit > -# one in Makefile.in. > -objcp/objcp-act.o : objc/objc-act.c \ [...] which leads to a build failure: | make[3]: *** No rule to make target `objcp/objcp-act.o', needed by `cc1objplus'. Stop. | make[3]: *** Waiting for unfinished jobs.... Cheers, Ralf