[distcc] Re: implicit compiler name
mbp at samba.org
Fri Sep 20 05:50:00 GMT 2002
On 20 Sep 2002, Alexandre Oliva <oliva at lsd.ic.unicamp.br> wrote:
> 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 in the PATH, drop
> everything you find until you encounter yourself, and start searching
> for another occurrence of argv starting from there. The tricky
> part is to tell when you've encountered yourself, though.
That sounds pretty good, but...
distcc -c hello.c
So we need to somehow work out whether we're meant to look for another
compiler with the same name (e.g. ln -s distcc cc; cc -c hello.c), or
whether we're meant to call "cc" or $DISTCC_CC (e.g. "distcc -c
That decision might be based on whether argv looks like "distcc",
or perhaps on whether any other compiler can be found on the path.
All this also has to be done on the command line passed remotely.
I suppose we could drop "distcc -c hello.c", but I kind of like it as
a tradeoff between brevity and clarity. I'm finding that for many
free packages it works pretty well.
More information about the distcc