This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

using distcc to speed up GCC bootstraps


Jeff had asked me to post instructions on how to use distcc to
bootstrap GCC.  I said I would as soon as the code to support that was
in.  Well, it turns out that, thanks to Per Bothner's
not-so-recent-any-more :-) patches, it works again, so, here's the
summary:

What you need:

- distccd running on a collection of hosts

- the build tree visible on all such hosts in the same pathname
  (they're going to need it to run compilers from the build tree)

- distccrel: a wrapper script/program used to start distcc after
  turning relative filenames in the command line into absolute
  filenames.

- an optional script/program that used to turn relative pathnames into
  network-neutral absolute filenames.

What you have to do:

- Set up DISTCC_HOSTS and start distccd on the remote servers if
  appropriate.  Set CC="distcc gcc" if you like.  CC="ccache
  distcc gcc" will do as well.  CXX="ccache distcc g++" may help too.

- Set DISTCCREL_HOSTS to $DISTCC_HOSTS.  distccrel has some magic to
  avoid running compilations on localhost, that are no longer
  necessary now that GCC generates identical object files with or
  without separate preprocessing.  Alternatively, you may just set
  DISTCCREL_LOCALHOST=localhost

- Set the environment variable NETPWD to the script/program that, when
  run, outputs an absolute pathname that corresponds to the current
  working directory on all the distcc servers.  If running pwd in the
  build tree outputs a pathname that corresponds to the build tree on
  all hosts, set the environment variable NETPWD to it.  Otherwise,
  customize the netpwd script (attached) such that it does, and set
  NETPWD to it.

- Set the environment variable STAGE_CC_WRAPPER to distccrel

- configure and make -jN bootstrap


The scripts mentioned above are attached.

I hope this helps,

Attachment: distccrel
Description: Binary data

Attachment: netpwd
Description: Binary data

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Happy GNU Year!                     oliva@{lsd.ic.unicamp.br, gnu.org}
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist                Professional serial bug killer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]