[distcc] Re: Distcc & GDB (fix)

Alexandre Oliva oliva at lsd.ic.unicamp.br
Sun May 11 02:47:27 GMT 2003


On May 10, 2003, Martin Pool <mbp at sourcefrog.net> wrote:

> Regardless of distcc, embedding the compiler pwd is a pretty ugly way
> to record where the source directory is, and I would hope the gcc
> maintainers would fix it for this reason.

Please note that embedding the pwd of the preprocessor/compiler in the
object file *is* the right thing to do: a number of debugging info
formats have a well-defined location for this information, and this is
exactly what enables the debugger to find the source file even after
the executable is installed.  Of course, if the source tree moves or
is removed, the debugger will need help locating the source tree, and,
even if a new one is created, if it's in a different location, the
debugger will have to be pointed at it.

The unfortunate thing about the patch I wrote is that, since the pwd
of the preprocessor will be added to the preprocessed output, ccache
will cease to find that two otherwise-identical preprocessed files
match, just because the pwd will be different.

If anyone would still like to see this patch in, I believe the best
course of action would be to voice your opinion about the problem in
the gcc at gcc.gnu.org mailing list.  Unfortunately, I don't have a URL
handy for the patch I posted on August 23, 2002, proposing this patch,
and I can't seem to be able to download the contents of
http://gcc.gnu.org/ml/gcc-patches/2002-08/ ATM to find my posting in
there.


Martin, one thing that the preprocessor maintainers have been
proposing to me is to require an additional flag in order to enable
this patch and the other that enriches the preprocessed output such
that GCC knows the correct location of all tokens in the input stream,
like it does with the integrated preprocessor.  How do you feel about
having distcc implicitly pass such a flag to GCC?  Or should this be
just a documentation issue, e.g., if you run ccache/distcc/wahtever
with GCC, make sure you pass these flags to GCC (starting at some
future release) otherwise it won't get output identical to what you'd
get with local compilation with the integrated preprocessor.

-- 
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


More information about the distcc mailing list