public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jie Zhang <jie.zhang@analog.com>
To: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Cc: binutils@sourceware.org, Dave Korn <dave.korn.cygwin@googlemail.com>
Subject: Re: [PATCH] Fix parallel build error for Blackfin target (was Re:  Parallel  build error for Blackfin target)
Date: Wed, 02 Sep 2009 06:24:00 -0000	[thread overview]
Message-ID: <4A9E0F9B.8000409@analog.com> (raw)
In-Reply-To: <20090901211443.GC11144@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 3818 bytes --]

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

[-- Attachment #2: gas-fix-bfin-parallel-build.diff --]
[-- Type: text/x-patch, Size: 785 bytes --]


	* 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


  reply	other threads:[~2009-09-02  6:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  6:50 Parallel build error for Blackfin target Jie Zhang
2009-09-01  7:11 ` Dave Korn
2009-09-01  8:29   ` Jie Zhang
2009-09-01  8:41     ` Jie Zhang
2009-09-01  9:58       ` [PATCH] Fix parallel build error for Blackfin target (was Re: Parallel build error for Blackfin target) Jie Zhang
2009-09-01 21:14         ` Ralf Wildenhues
2009-09-02  6:24           ` Jie Zhang [this message]
2009-09-01 21:00   ` Parallel build error for Blackfin target Ralf Wildenhues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9E0F9B.8000409@analog.com \
    --to=jie.zhang@analog.com \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=binutils@sourceware.org \
    --cc=dave.korn.cygwin@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).