Fwd: [distcc] how to get separate compile tasks

ibaker at mail.cern.ch ibaker at mail.cern.ch
Mon Mar 23 13:16:36 GMT 2009

On Mon, 23 Mar 2009, Yanchun Wang wrote:

> Hi:
>     Thank for your answer.But I have another question.
> "GNU make" can compile program in multithread by option "-j".
> 1)  If "GNU make" calls GCC when multithread compiling, does "GNU make"
> know that GCC is placed by distcc?
> 2)  In other words, if I want to write a program like distcc, do I need to
> hack "GNU make"
> to make it know my program is a wrapper of GCC, and let "GNU make" to call
> my wrapper
> directly?
> 3) If "GNU make" does know  any knowledge on distcc, how does it can call
> distcc and give
> every thread a command line instruction?

An example.  I build a test package with the following command:

make -j32 CC=distcc

make will invoke distcc instead of gcc, and pass it the compiler 
arguments from the makefile.  With the -j option to make, many jobs are 
running concurrently, but they are all distcc processes (until they 
invoke gcc of course).  GNU Make doesn't need to be modified for distcc to work.

Ian Baker

> 2009/3/23 <ibaker at mail.cern.ch>
>> On Mon, 23 Mar 2009, Yanchun Wang wrote:
>>  ---------- Forwarded message ----------
>>> From: Yanchun Wang <yanchun.wng at gmail.com>
>>> Date: 2009/3/23
>>> Subject: Re: [distcc] how to get separate compile tasks
>>> To: DaNiMoTh <jjdanimoth at gmail.com>
>>> Hi:
>>> If  distcc's input is a makefile...
>> distcc's input isn't a makefile.  Within the makefile, distcc is invoked as
>> a wrapper around gcc and as such intercepts and analyses the compiler
>> arguments.
>> Ian Baker

More information about the distcc mailing list