This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix parallel build error for Blackfin target (was Re: Parallel build error for Blackfin target)
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.
> 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?
Thanks,
Ralf
> * Makefile.am (bfin-defs.h, $(srcdir)/config/bfin-defs.h):
> Rename to ...
> (bfin-parse.h, $(srcdir)/config/bfin-parse.h): ... these.
> * Makefile.in: Regenerate.
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
-bfin-defs.h: ; @true
-$(srcdir)/config/bfin-defs.h: ; @true
+bfin-parse.h: ; @true
+$(srcdir)/config/bfin-parse.h: ; @true
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
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
+
# 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