This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix parallel build error for Blackfin target (was Re: Parallel build error for Blackfin target)


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
	* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]