User Tools

Site Tools


system:distcc:start

Distributed C Compiling

Distcc is a client/server application allowing to compile C code by distributing it amongst multiple machines. The result is more or less something like a compile-cluster.

In Gentoo, distcc is integrated nicely into Portage, so using it when installing packages with emerge is as easy as eatin' pancakes.

Compiling The Kernel

Using distcc for kernel compilation still needs some manual setup, even in Gentoo.

First, fetch settings from /etc/make.conf (one might want to add this to .bashrc):

eval `grep '\(DISTCC_HOSTS\|MAKEOPTS\)' /etc/make.conf`
export DISTCC_HOSTS MAKEOPTS

Then call make appropriately:

make CC="distcc gcc" $MAKEOPTS

Adding a custom wrapper to make appears nice and easy:

my_make() {
	if [[ $PWD == /usr/src/linux ]]; then
		make CC="distcc gcc" $MAKEOPTS $@
	else
		make $@
	fi
}
alias make=my_make
system/distcc/start.txt · Last modified: 2013/12/14 16:04 by 127.0.0.1