How to build gcc with distcc?
gcc uses an unusual three-stage process to verify that the compiler can recompile itself with the same results. Because of bugs in the gcc integrated preprocessor, compiling locally can produce a program that is functionally identical, but not byte-for-byte identical, with a program compiled remotely. This can apparently be fixed by specifying 127.0.0.1 in the host list, rather than localhost. This causes distcc to run compilation “remotely” onto the same machine, which should be the same as compiling remotely. You will also need to make sure that the build directory is mounted at the same location on all machines so that the new compiler can be located.