[distcc] Re: implicit compiler name

Martin Pool mbp at samba.org
Sun Sep 15 04:39:00 GMT 2002


On 15 Sep 2002, Alexandre Oliva <oliva at lsd.ic.unicamp.br> wrote:
> On Sep 14, 2002, Martin Pool <mbp at samba.org> wrote:

> > Another approach, although not so general, would be to have both
> > DISTCC_CC and DISTCC_CXX, and use one or the other depending on
> > whether C or C++ code is being compiled.

> This would be tricky.  How would you tell, given that foo.c is
> allowed to be a C++ source file as long as you compile it using g++?

I was planning to just look at the extension, but as you say that is
inadequate.

People in that situation could just set DISTCC_CC=g++, unless they
also have files in the same project that are C, are called .c and need
to be built with gcc.  I hate to think what their Makefile must look
like.

> /me thinks it would be best to install distCC or distcxx in addition
> to distcc, such that distcxx would run g++ and distcc would run gcc.

Yes, that would be OK.  Or maybe "distc++"?  It could either use
argv[0] tricks, or be the same program just with a slightly different
main().  It looks from the gcc manual like gcc uses the second
approach, and I think I prefer it too.

People might then ask for a --with-default-cc option so that you can,
if you want, build "m68k-linux-distcc".

And by that point perhaps "ln -s distcc gcc" was simpler after all...

> But I dislike this solution too...  I'd much rather just say `distcc
> gcc' and be done with it.

Yes, if that works with your Makefiles etc it is far clearer.

-- 
Martin 



More information about the distcc mailing list