This shows you the differences between two versions of the page.
— |
distcc [2014/11/24 01:14] (current) 0.0.0.0 created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Distcc ====== | ||
+ | ===== Overview ===== | ||
+ | Distcc is used to compile packages faster on slow machines, such as [[Santo]] or the virtual machines, by doing some of the grunt work on physical hosts. | ||
+ | |||
+ | ===== Build Hosts ===== | ||
+ | * build0.sihnon.net ([[River]]) | ||
+ | * build1.sihnon.net ([[Badger]]) | ||
+ | * < | ||
+ | |||
+ | The build hosts use the following architectures: | ||
+ | |||
+ | {| class=" | ||
+ | |+ Architecture details | ||
+ | |- | ||
+ | ! Name | ||
+ | ! Value | ||
+ | |- | ||
+ | | **CHOST** | ||
+ | | x86_64-pc-linux-gnu | ||
+ | |- | ||
+ | | **gcc version** | ||
+ | | 4.4.2 | ||
+ | |} | ||
+ | |||
+ | The following cross-compilation environments are also available: | ||
+ | * i586-pc-linux-gnu | ||
+ | * i686-pc-linux-gnu | ||
+ | |||
+ | ===== Configuring a build host ===== | ||
+ | * Install {{Package|direct=yes|sys-devel/ | ||
+ | * Configure the distcc daemon to accept connections from local machines only | ||
+ | {{File|/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Configuring a new cross-compilation environment ==== | ||
+ | Run the following command on each build host, where < | ||
+ | |||
+ | {{Root|< | ||
+ | crossdev -t i586 | ||
+ | </ | ||
+ | |||
+ | This command will build the necessary tools for cross-compilation, | ||
+ | * binutils | ||
+ | * linux-headers-quick | ||
+ | * glibc-headers | ||
+ | * gcc-stage1 | ||
+ | * linux-headers | ||
+ | * glibc | ||
+ | * gcc-stage2 | ||
+ | |||
+ | ===== Configuring a build client ===== | ||
+ | If the client has the same CHOST as all the build hosts, then setting up distcc is straightforward: | ||
+ | |||
+ | * Install {{Package|direct=yes|sys-devel/ | ||
+ | * Configure distcc to use each of the available build hosts with the following command: | ||
+ | {{Root|< | ||
+ | distcc-config --set-hosts " | ||
+ | </ | ||
+ | * Configure portage to use distcc for compilations by adding setting the following option: | ||
+ | {{File|/ | ||
+ | FEATURES=" | ||
+ | </ | ||
+ | |||
+ | ==== Configuring a build client with a different CHOST to the build hosts ==== | ||
+ | As explained in the Gentoo documentation, | ||
+ | |||
+ | * Create the wrapper script in < | ||
+ | {{File|/ | ||
+ | #!/bin/bash | ||
+ | exec / | ||
+ | </ | ||
+ | |||
+ | * Make the wrapper script executable, and replace the unqualified tool symlinks with symlinks to the new wrapper: | ||
+ | {{Root|< | ||
+ | cd / | ||
+ | chmod a+x i686-pc-linux-gnu-wrapper | ||
+ | rm cc gcc c++ g++ | ||
+ | ln -s i686-pc-linux-gnu-wrapper cc | ||
+ | ln -s i686-pc-linux-gnu-wrapper gcc | ||
+ | ln -s i686-pc-linux-gnu-wrapper c++ | ||
+ | ln -s i686-pc-linux-gnu-wrapper g++ | ||
+ | </ | ||
+ | |||
+ | ===== See Also ===== | ||
+ | * http:// | ||
+ | * http:// |