I wanted to set up my server to be able to host distccd for both x86_64 and i686 clients. In order for it to be able to do the right thing for ebuilds that invoke the compiler as just "gcc" instead of something like "i686-pc-linux-gnu-gcc", I decided to run one instance of distccd for each architecture. Toward that end, I modified the distccd init.d script to support the DISTCCD_PATH environment variable, and to create new distccd instances by making a symlink to /etc/init.d/distccd. This allows me to set up directories with wrapper scripts or symlinks from "gcc" to the appropriate compiler. The main advantages of this are: 1) No need to create wrapper scripts on each client 2) works with both crossdev and scripts that wrap the native compiler (e.g. adding -m32 flag to compile i686 with an x86_64 compiler). Reproducible: Always Steps to Reproduce:
Created attachment 250277 [details, diff] Patch to the distcc init script I'm not sure if this is the preferred method of setting an environment variable for the daemon or if start-stop-daemon -e or env is better.
I could mark this as a duplicate of bug #243502, the ongoing effort to stop bad upstream programming practices: fixing packages that disrespect (the canonical quintuplet) CC is really what you want to achieve here. But I will let maintainers of distcc decide.
(In reply to comment #2) Agreed. Ideally, this wouldn't be needed. But for now it seems like a practical workaround.