using distcc to speed up GCC bootstraps
Alexandre Oliva
aoliva@redhat.com
Wed Feb 18 04:59:00 GMT 2004
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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: distccrel
Type: application/octet-stream
Size: 5290 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20040218/388ff9f6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netpwd
Type: application/octet-stream
Size: 803 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20040218/388ff9f6/attachment-0001.obj>
-------------- next part --------------
--
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
More information about the Gcc
mailing list