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] gcc bootstraps with distcc


Alexandre Oliva wrote:-

> > I'm not sure about this - someone separated out the -g stuff for a good
> > reason that I can't recall (hence the cpp_debug_options or whatever
> > it's called in gcc.c)
> 
> Is cpp_unique_options what you have in mind?

No, cpp_debug_options.  Your patch seems to conflict its intent - 
please investigate this.

> I didn't want to modify flag_working_directory, thinking of a compile
> server that might take different inputs with different command lines.
> I'm not entirely sure how this is supposed to work, though, so I'll
> make the change you requested.

Thanks.

> > Please put this inside the if (preprocessed) condition.
> 
> ???  I don't see how this would work.  The very point of this code is
> to emit the dir_change directive when our input is not preprocessed.
> I might move it to an else, but then gcc -E -fno-working-directory |
> gcc -E -fpreprocessed -fworking-directory would not have a working
> directory line in the output.

I was getting -fpreprocessed confused with -E; something I do a lot.

> > I don't understand the need for both this callback and the one above.
> > It's be nice if the logic were only in the read_original_directory function.
> > Could you explain?
> 
> The second callback is called if read_original_directory() is called
> and succeeds in reading a directory from a preprocessed input.  If we
> don't have preprocessed input, we never call read_original_file(),
> that is the only caller of read_original_directory().  So, in the
> common case of preprocessing a non-preprocessed input, we need the
> first callback in order to get a directory directive in the first
> place.  In case we find a working directory directive in the
> preprocessed input, we disable the working directory option at the end
> of read_original_directory(), such that the callback in
> cpp_read_main_file() doesn't get exercised.

OK, this is fine I guess.  My confusion carried over from above.

Neil.


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