| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version='1.0' encoding="UTF-8"?> |
| 2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.39 2006/12/24 17:54:01 nightmorph Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/distcc.xml,v 1.43 2009/06/14 10:23:32 nightmorph Exp $ --> |
| 4 | |
4 | |
| 5 | <guide link="/doc/en/distcc.xml"> |
5 | <guide link="/doc/en/distcc.xml"> |
| 6 | |
6 | |
| 7 | <title>Gentoo Distcc Documentation</title> |
7 | <title>Gentoo Distcc Documentation</title> |
| 8 | |
8 | |
| … | |
… | |
| 21 | <author title="Editor"> |
21 | <author title="Editor"> |
| 22 | <mail link="pylon@gentoo.org">Lars Weiler</mail> |
22 | <mail link="pylon@gentoo.org">Lars Weiler</mail> |
| 23 | </author> |
23 | </author> |
| 24 | <author title="Reviewer"> |
24 | <author title="Reviewer"> |
| 25 | <mail link="blubber@gentoo.org">Tiemo Kieft</mail> |
25 | <mail link="blubber@gentoo.org">Tiemo Kieft</mail> |
|
|
26 | </author> |
|
|
27 | <author title="Editor"> |
|
|
28 | <mail link="nightmorph"/> |
| 26 | </author> |
29 | </author> |
| 27 | |
30 | |
| 28 | <abstract> |
31 | <abstract> |
| 29 | This document serves as a HOWTO for using distcc with Gentoo. |
32 | This document serves as a HOWTO for using distcc with Gentoo. |
| 30 | </abstract> |
33 | </abstract> |
| 31 | |
34 | |
| 32 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
35 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 33 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
36 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 34 | <license/> |
37 | <license/> |
| 35 | |
38 | |
| 36 | <version>1.18</version> |
39 | <version>1.22</version> |
| 37 | <date>2006-12-24</date> |
40 | <date>2009-06-14</date> |
| 38 | |
41 | |
| 39 | <chapter> |
42 | <chapter> |
| 40 | <title>Introduction</title> |
43 | <title>Introduction</title> |
| 41 | <section> |
44 | <section> |
| 42 | <title>What is distcc?</title> |
45 | <title>What is distcc?</title> |
| … | |
… | |
| 119 | |
122 | |
| 120 | <pre caption="Integrating Distcc and Portage"> |
123 | <pre caption="Integrating Distcc and Portage"> |
| 121 | # <i>emerge distcc</i> |
124 | # <i>emerge distcc</i> |
| 122 | # <i>nano -w /etc/make.conf</i> |
125 | # <i>nano -w /etc/make.conf</i> |
| 123 | <comment>(Set N to a suitable number for your particular setup)</comment> |
126 | <comment>(Set N to a suitable number for your particular setup)</comment> |
| 124 | <comment>(A common strategy is setting N as twice the number of total CPUs + 1 |
127 | <comment>(A common strategy is setting N as twice the number of total CPUs + 1 available)</comment> |
| 125 | available)</comment> |
|
|
| 126 | MAKEOPTS="-jN" |
128 | MAKEOPTS="-jN" |
| 127 | <comment>(Add distcc to your FEATURES)</comment> |
129 | <comment>(Add distcc to your FEATURES)</comment> |
| 128 | FEATURES="distcc" |
130 | FEATURES="distcc" |
| 129 | </pre> |
131 | </pre> |
| 130 | |
132 | |
| … | |
… | |
| 159 | </p> |
161 | </p> |
| 160 | |
162 | |
| 161 | <p> |
163 | <p> |
| 162 | Since most people won't be using lines 3 or 4, I'll <uri |
164 | Since most people won't be using lines 3 or 4, I'll <uri |
| 163 | link="http://distcc.samba.org/man/distcc_1.html">refer to</uri> the distcc |
165 | link="http://distcc.samba.org/man/distcc_1.html">refer to</uri> the distcc |
| 164 | docs (man distcc) for more information. |
166 | docs (man distcc) for more information, which includes being able to run distcc |
|
|
167 | over an SSH connection. |
| 165 | </p> |
168 | </p> |
| 166 | |
169 | |
| 167 | <p> |
170 | <p> |
| 168 | For instance, to set the first line in the previous example: |
171 | For instance, to set the first line in the previous example: |
| 169 | </p> |
172 | </p> |
| … | |
… | |
| 281 | <section> |
284 | <section> |
| 282 | <title>Step 2: Getting Distcc</title> |
285 | <title>Step 2: Getting Distcc</title> |
| 283 | <body> |
286 | <body> |
| 284 | |
287 | |
| 285 | <p> |
288 | <p> |
| 286 | Before the installation of distcc, a user called distcc must be added to the |
|
|
| 287 | <path>/etc/passwd</path>: |
|
|
| 288 | </p> |
|
|
| 289 | |
|
|
| 290 | <pre caption="Create user distcc"> |
|
|
| 291 | # <i>echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >>/etc/passwd</i> |
|
|
| 292 | </pre> |
|
|
| 293 | |
|
|
| 294 | <impo> |
|
|
| 295 | It is important to note that adding users like this is very bad. We only do |
|
|
| 296 | it here because there is no <c>useradd</c> utility (which you normally use for |
|
|
| 297 | adding users) yet at this stage of installation. |
|
|
| 298 | </impo> |
|
|
| 299 | |
|
|
| 300 | <p> |
|
|
| 301 | Install distcc: |
289 | Install distcc: |
| 302 | </p> |
290 | </p> |
| 303 | |
291 | |
| 304 | <pre caption="Getting Distcc on the new box"> |
292 | <pre caption="Getting Distcc on the new box"> |
| 305 | # <i>USE='-*' emerge --nodeps sys-devel/distcc</i> |
293 | # <i>USE='-*' emerge --nodeps sys-devel/distcc</i> |
| … | |
… | |
| 380 | <impo> |
368 | <impo> |
| 381 | Doing this explicitly redefines some behaviour of Portage and may have some |
369 | Doing this explicitly redefines some behaviour of Portage and may have some |
| 382 | weird results in the future. Only do this if you're mixing CHOSTs. |
370 | weird results in the future. Only do this if you're mixing CHOSTs. |
| 383 | </impo> |
371 | </impo> |
| 384 | |
372 | |
|
|
373 | |
|
|
374 | </body> |
|
|
375 | </section> |
|
|
376 | <section> |
|
|
377 | <title>-march=native</title> |
|
|
378 | <body> |
|
|
379 | |
|
|
380 | <p> |
|
|
381 | Starting with GCC 4.3.0, the compiler supports the <c>-march=native</c> switch |
|
|
382 | which turns on CPU autodetection and optimizations that are worth being enabled |
|
|
383 | on the processor the GCC is running at. This is a problem with <c>distcc</c> as |
|
|
384 | it allows mixing of code optimized for different processors (like AMD Athlon and |
|
|
385 | Intel Pentium). <e>Don't</e> use <c>-march=native</c> or <c>-mtune=native</c> in |
|
|
386 | your <c>CFLAGS</c> or <c>CXXFLAGS</c> when compiling with <c>distcc</c>. |
|
|
387 | </p> |
| 385 | |
388 | |
| 386 | </body> |
389 | </body> |
| 387 | </section> |
390 | </section> |
| 388 | </chapter> |
391 | </chapter> |
| 389 | |
392 | |