[distcc] Re: implicit compiler name

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


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

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

This is the case I had in mind.

> or whether we're meant to call "cc" or $DISTCC_CC (e.g. "distcc -c
> hello.c").

I don't see a reason to support this behavior.

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

Well, perhaps we could use the following strategy: we look for
basename argv[0] in the PATH elements after the one that contains our
own executable.  If we don't find it (i.e., there's no other distcc),
then we start over looking for ${DISTCC_CC-cc} or ${DISTCC_CXX-c++},
depending on the extension of the source file.  How's that?

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