From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26417 invoked by alias); 2 Sep 2009 06:24:52 -0000 Received: (qmail 26409 invoked by uid 22791); 2 Sep 2009 06:24:50 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM X-Spam-Check-By: sourceware.org Received: from nwd2mail11.analog.com (HELO nwd2mail11.analog.com) (137.71.25.57) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Sep 2009 06:24:42 +0000 Received: from nwd2hubcas1.ad.analog.com ([10.64.73.29]) by nwd2mail11.analog.com with ESMTP; 02 Sep 2009 02:24:41 -0400 Received: from nwd2exm5.ad.analog.com (10.64.51.20) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.1.358.0; Wed, 2 Sep 2009 02:24:40 -0400 Received: from chinexm1.ad.analog.com ([10.99.27.42]) by nwd2exm5.ad.analog.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 2 Sep 2009 02:24:40 -0400 Received: from [10.99.29.103] ([10.99.29.103]) by chinexm1.ad.analog.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 2 Sep 2009 14:24:37 +0800 Message-ID: <4A9E0F9B.8000409@analog.com> Date: Wed, 02 Sep 2009 06:24:00 -0000 From: Jie Zhang User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: Ralf Wildenhues CC: binutils@sourceware.org, Dave Korn Subject: Re: [PATCH] Fix parallel build error for Blackfin target (was Re: Parallel build error for Blackfin target) References: <4A9CC410.7060301@analog.com> <4A9CCC56.9090008@gmail.com> <4A9CDB37.70604@analog.com> <4A9CDE3C.3000604@analog.com> <4A9CF027.8020301@analog.com> <20090901211443.GC11144@gmx.de> In-Reply-To: <20090901211443.GC11144@gmx.de> Content-Type: multipart/mixed; boundary="------------080107080305040402060909" X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00052.txt.bz2 --------------080107080305040402060909 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 3818 Ralf Wildenhues wrote: > Hello, > > * Jie Zhang wrote on Tue, Sep 01, 2009 at 11:57:59AM CEST: >> Jie Zhang wrote: >>> It seems "bfin-parse.h $(srcdir)/config/bfin-defs.h" is still >>> needed as the prerequisite for bfin-lex.o. > > There is a typo here, both bfin-parse.h and ...bfin-defs.h appear on > this line. You meant only bfin-parse.h instances I guess. > I meant the string "bfin-parse.h $(srcdir)/config/bfin-defs.h". >> This patch adds back "bfin-parse.h $(srcdir)/config/bfin-defs.h". >> But I'm not sure this is a good patch or not, since I don't know why >> Ralf removed them or just by accident. Anyway this fixes my build >> problem. So I'd like send out for review. > > This is not sufficient, as per your own comment above. > > Also, it seems it does not address the situation for itbl-parse.h > which is similar in this makefile. I think the patch below should > fix things at least in gas. An alternative would be to add the > generated headers to BUILT_SOURCES, that would ensure they are created > early enough. > > Can you try this patch? Gas parallel build does not fail for bfin targets with your patch. But there is something need change in your patch, I think. See below. >> * Makefile.am (bfin-defs.h, $(srcdir)/config/bfin-defs.h): >> Rename to ... >> (bfin-parse.h, $(srcdir)/config/bfin-parse.h): ... these. >> * Makefile.in: Regenerate. > It seems I sent the wrong patch in my previous email. The patch I intended to send is attached. > > diff --git a/gas/Makefile.am b/gas/Makefile.am > index b8e86b1..2ae94b1 100644 > --- a/gas/Makefile.am > +++ b/gas/Makefile.am > @@ -606,12 +606,12 @@ bfin-parse.h: bfin-parse.c > bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h \ > $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h > I think bfin-parse.h can be removed here. Since bfin-parse.o does not use bfin-parse.h. Instead, $(srcdir)/config/bfin-aux.h should be added as prerequisite. See http://sourceware.org/ml/binutils/2009-09/msg00022.html > -bfin-defs.h: ; @true > -$(srcdir)/config/bfin-defs.h: ; @true > +bfin-parse.h: ; @true > +$(srcdir)/config/bfin-parse.h: ; @true > This is same as my patch. http://sourceware.org/ml/binutils/2009-09/msg00023.html > bfin-lex.c: $(srcdir)/config/bfin-lex.l > $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE) > -bfin-lex.o: bfin-lex.c > +bfin-lex.o: bfin-lex.c bfin-parse.h I think $(srcdir)/config/bfin-defs.h is also needed as a prerequisite for bfin-lex.o. See the patch I attached. > if am__fastdepCC > $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ bfin-lex.c $(NO_WERROR) > mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po > @@ -623,11 +623,14 @@ endif > $(COMPILE) -c bfin-lex.c $(NO_WERROR) > endif > > +bfin-lex.h: bfin-lex.c ; @true > +$(srcdir)/config/bfin-lex.h: ; @true > + I don't think the above two lines are needed. No bfin-lex.h will be generated. > # The instruction table specification lexical analyzer and parser. > > # Disable -Werror, if it has been enabled, since old versions of bison/ > # yacc will produce working code which contain compile time warnings. > -itbl-lex.o: itbl-lex.c > +itbl-lex.o: itbl-lex.c itbl-parse.h > if am__fastdepCC > $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-lex.c $(NO_WERROR) > mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po > @@ -653,9 +656,11 @@ endif > $(COMPILE) -c itbl-parse.c $(NO_WERROR) > endif > > -itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y > +itbl-parse.c: $(srcdir)/itbl-parse.y > $(SHELL) $(YLWRAP) $(srcdir)/itbl-parse.y y.tab.c itbl-parse.c y.tab.h itbl-parse.h -- $(YACCCOMPILE) -d > > +itbl-parse.h: itbl-parse.c ; @true > + > # stand-alone itbl assembler & disassembler > > EXTRA_PROGRAMS = itbl-test > Jie --------------080107080305040402060909 Content-Type: text/x-patch; name="gas-fix-bfin-parallel-build.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gas-fix-bfin-parallel-build.diff" Content-length: 785 * Makefile.am (bfin-lex.o): Add bfin-parse.h and $(srcdir)/config/bfin-defs.h to the prerequisite. * Makefile.in: Regenerate. Index: Makefile.am =================================================================== RCS file: /cvs/src/src/gas/Makefile.am,v retrieving revision 1.181 diff -u -r1.181 Makefile.am --- Makefile.am 26 Aug 2009 18:27:36 -0000 1.181 +++ Makefile.am 1 Sep 2009 09:39:07 -0000 @@ -611,7 +611,7 @@ bfin-lex.c: $(srcdir)/config/bfin-lex.l $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE) -bfin-lex.o: bfin-lex.c +bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h if am__fastdepCC $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ bfin-lex.c $(NO_WERROR) mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po --------------080107080305040402060909--