[distcc] Using cc1/cc1plus directly from distccd?

Martin Pool mbp at samba.org
Wed Feb 26 02:40:18 GMT 2003


Hi, Sorry for not replying before.

On 18 Feb 2003, "Stuart D. Gathman" <stuart at bmsi.com> wrote:

> Hello, I am new to distcc.  I have been using my own version of distributed 
> gcc for 15 years.  It works by replacing cc1 and cc1plus with a stub that 
> runs those programs on a remote system.  The remote system is typically 
> running a cross compiler.  This allowed me to port GCC to SysV88 despite 
> the fact that the included GreenHills compiler was too buggy to compile 
> GCC.  It allowed me to port GCC to AIX without buying IBM's very good but 
> very expensive compiler. It now allows me to compile much faster on our 
>  old slow (100Mhz PPC604) AIX system than with the local compiler.

Very cool :-)  

> Lo and behold, I found distcc which already does everything I want - 
> almost. The problem is that I compile only the cc1 and cc1plus cross 
> compiler programs.  It is way too much trouble to get includes, libraries, 
> etc installed in an alien system for a complete cross compiler.

Yes, I agree.  It would be nice to document how to install only the
parts of the toolchain that distcc needs (cc1, cc1plus, and gas.)

> These are in fact, the only programs needed for distcc (and my own
> stub).  However, distccd seems to call the gcc front end rather than
> cc1 or cc1plus.  

In gcc, if I understand correctly, the 'cc' front end is pretty thin,
but it does more than just directly call cpp or cc1.  I think it adds
some parameters based on the spec files.

For simplicity, rather than reproducing this functionality, I thought
I would just call gcc remotely.   I suppose it might be slightly
faster not to call cc.

> Is there any way to avoid calling the front end on the volunteer
> system, and run only the compiler proper with distcc?

There is not at the moment.  I suppose distcc could be changed to do
it, but why?

-- 
Martin 


More information about the distcc mailing list