Beginner GCC projects question
Zack Weinberg
zack@codesourcery.com
Mon May 17 19:29:00 GMT 2004
Paolo Bonzini <bonzini@gnu.org> writes:
>> I have come to the conclusion
>> that a 'make dep'-style prescan is unavoidable, and I have a fairly
>> detailed plan for implementing it, but I lack time.
>
> I don't think so, I think that writing dependencies by hand for gen*
> (and rtl.o, bitmap.o, varray.o, errors.o) is sufficient. The real
> source of complication is crossbuilds (CC_FOR_BUILD != CC).
See, the solution to the crossbuild problem (and to the "non-GCC
bootstrap compiler" problem) is to build cpplib for the build machine,
and wrap a custom tool around it. That part is easy. But once
you've done that, why not make the custom tool a little cleverer so
that it can generate _all_ the dependencies? I don't think it's
hard.
Doing all the dependency calculation at once a la "make dep" also has
the advantage that the makefile logic is much simpler. On rebuild,
the tool and Make can cooperate to not recalculate dependencies that
haven't changed (this is what $? is for).
zw
More information about the Gcc
mailing list