[distcc] using distcc to speed up gcc bootstraps

Alexandre Oliva aoliva at redhat.com
Tue Aug 13 18:14:00 GMT 2002


A while ago, we've been talking about using distcc to speed up gcc
bootstraps.  I've made some progress today towards this goal, but
there's still some way to go to get there.

I've written a wrapper for distcc that goes over the command line
arguments looking for relative pathnames and, if it finds any, it
turns them into network-neutral full pathnames, using the netpwd
script below, and then runs the real distcc to do the work.

Unfortunately, this solution is not complete yet, since libstdc++-v3
fails to configure with this patch.  I'm yet to investigate why, but I
wanted heads up that I've made some progress.

I enclose below the patch for GCC I'm using, that, if you set
STAGE_CC_WRAPPER=distcc, will let you take advantage of distcc for the
several stages of gcc.  I'd like to put this patch in as soon as I get
it into a functional state, but I'm open to suggestions for the name
of the variable.

I also enclose the distcc wrapper script and the netpwd script it uses
to turn pwd into a network-neutral full pathname.

Besides the problem mentioned above, I've run into two other problems:

- the bootstrap check fails, even though I have every reason to
  believe it bootstrapped correctly.  I believe the cause of the
  failure is the problem documented in distcc's manual: that gcc adds
  the preprocessed filename to the debugging info emitted for each
  file.  I believe it shouldn't do this, but rather just use the name
  in the first #line directive in the preprocessed file.  I'll look
  into trying to fix this problem, if I confirm it is indeed the
  reason for the failure.

- the load on my build machine skyrockets while building the ada
  compiler and the Java library.  It would be nice if distcc could
  throttle other instances thereof when it realizes it can't send
  builds to remote build servers.  A lock on localhost, to be used in
  such situations, would be ideal IMO.  Is this an acceptable change
  for distcc?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stage-cc-wrapper.patch
Type: text/x-patch
Size: 4028 bytes
Desc: not available
Url : http://lists.samba.org/archive/distcc/attachments/20020813/abeb49b1/stage-cc-wrapper.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: distcc
Type: application/x-sh
Size: 1286 bytes
Desc: not available
Url : http://lists.samba.org/archive/distcc/attachments/20020813/abeb49b1/distcc.sh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netpwd
Type: application/x-sh
Size: 790 bytes
Desc: not available
Url : http://lists.samba.org/archive/distcc/attachments/20020813/abeb49b1/netpwd.sh
-------------- next part --------------

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