[distcc] Re: implicit compiler name

Alexandre Oliva oliva at lsd.ic.unicamp.br
Fri Sep 20 05:24:01 GMT 2002

On Sep 20, 2002, Martin Pool <mbp at samba.org> wrote:

> So checking symlinks to find out which is the real compiler may be a
> bit hard.  

Besides, consider what if ccache decided to take the same policy: all
of a sudden, it would stop finding distcc (if it's a gcc->distcc link)
and going straight to gcc (assuming that's not also a symlink in say

IMHO the right way to do it is to search for argv[0] in the PATH, drop
everything you find until you encounter yourself, and start searching
for another occurrence of argv[0] starting from there.  The tricky
part is to tell when you've encountered yourself, though.

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