This is the mail archive of the gcc-patches@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: [distcc] using distcc to speed up gcc bootstraps


On Aug 24, 2002, Neil Booth <neil@daikokuya.co.uk> wrote:

> Alexandre Oliva wrote:-
>> > As part of cc1's preprocessed output code.
>> 
>> But how does it tell that it's time to emit the <directory> directive?

> cc1 should be doing the preprocessed output.  Currently it's in
> cppmain.c, but it should be moved to a "c-" file in the front end.
> This is all part of the work to make cpplib a proper library.
> If cc1 is doing the preprocessed output, it's easy for it to dump
> whatever it wants in there.

The problem is not just about dumping, it's also about initializing
properly when reading back.  I've just tried to move the outputting of
<directory> to cppmain.c.  It doesn't work.  When c-lex.c's
cb_file_change get to see the <directory> directive, we're already
past debug_hooks->init, where the die of the compile unit is
generated.

Barring major reworking in the rest of the compiler, it is
read_original_filename() that must find out the current directory, for
the same reason that it has to find out the main input filename in
advance.

As for adding another string to the initial pathname line, I suppose I
could do it, but how would this info get passed into cb_file_change
anyway?  It's not use to have the info in the preprocessed file if it
doesn't reach the interested parties :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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