DistCC
From OpenTTD
Compiling with DistCC is relatively easy, as long as you compile via the Makefile.
[edit] What is DistCC?
DistCC is a small program which allows cross-network compiling. In other words, instead of your PC alone doing to work, it sends out files to be compiled on other hosts. This way you can speed up your compile-time by a lot.
[edit] How to configure OpenTTD to use DistCC?
Simply:
- Run
makefirst, wait till you see the language files compile, then stop it. This is needed so we have a Makefile.config. - Open Makefile.config.
- Goto
CC_TARGET=, change this in:CC_TARGET=distcc gcc<- where gcc is your compiler, see note below. - Goto
CC_HOST, change this inCC_HOST=gcc<- where gcc is your compiler, see note below. - Save file, close.
- Type
make -jN, where N is the amounts of CPUs + 1 (or any other number, just don't put it to high).
Note
gcc is normally your compiler. This can be very tricky to use because gcc is used on any platform where the GNU C-Compiler is installed. Not all compilers can build files that your computer can read. This means you have to be very careful which hosts you use to help you out compiling. They have to support your system.
gcc is normally your compiler. This can be very tricky to use because gcc is used on any platform where the GNU C-Compiler is installed. Not all compilers can build files that your computer can read. This means you have to be very careful which hosts you use to help you out compiling. They have to support your system.
Gentoo has a nice solution for that: it doesn't use gcc, but, for example, i386-linux-pc-gnu-gcc. Every host that has support for this platform and has this file, and so distcc can compile perfectly. Not all distros do have this solution, so don't be all to suprised when you get weird errors.
Also, most distros support cross-compiling tools. Installing this on a slave can help out.