This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Beginner GCC projects question


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


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