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: Parallel build error for Blackfin target


Jie Zhang wrote:
Dave Korn wrote:
Jie Zhang wrote:

Previously

bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
        $(COMPILE) -c $< $(NO_WERROR)

Now

bfin-lex.o: bfin-lex.c
if am__fastdepCC
        $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@
bfin-lex.c $(NO_WERROR)
        mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
else
if AMDEP
        source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif
        $(COMPILE) -c bfin-lex.c $(NO_WERROR)
endif

Should I add back "bfin-parse.h $(srcdir)/config/bfin-defs.h" as the
dependency of bfin-lex.o?

Perhaps $(srcdir)/config/bfin-defs.h should be added as a preqrequisite of
bfin-parse.c (and hence implicitly of bfin-parse.h).


Really the whole thing needs some kind of sentinel or stamp wrapped around
it(*); what we've got here is the typical "make doesn't understand when a
single rule updates more than one target at once" situation. Running the rule
for bfin-parse.c actually also creates bfin-parse.h, which is what
necessitates the not-really-true-actually dependency of bfin-parse.h on
bfin-parse.c and the corresponding "@true" build rule. See also Paul D.
Smith's Rules of Makefiles; this violates #2.


The corresponding "@true" build rules are wrong here! They are

bfin-defs.h: ; @true
$(srcdir)/config/bfin-defs.h: ; @true

They should be

bfin-parse.h: ; @true
$(srcdir)/config/bfin-parse.h: ; @true

With this change, the bfin-* targets build well for me now. I'll make a patch and send out for approve soon.

I sent out the email too early. "make -j" still fails. :-(

It seems "bfin-parse.h $(srcdir)/config/bfin-defs.h" is still needed as the prerequisite for bfin-lex.o.


Jie



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