With FEATURES=distcc, portage creates DISTCC_DIR as $PORTAGE_TMPDIR/.distcc. When different values of PORTAGE_TMPDIR are used (e.g. set via package.env for packages that need more build space than /tmp offers), this results in two different DISTCC_DIRs being used.
Since DISTCC_DIR contains lock files that are used to limit the number of jobs distcc spawns, using two separate directories in parallel builds results in unexpectedly spawning double the expected number of compiler jobs which is bad for performance and memory consumption.
I don't feel like there's a good reason to place DISTCC_DIR in $PORTAGE_TMPDIR. Wouldn't it be better to use a shared location, e.g. /run/distcc?
(CC-ing distcc maintainers in case they have an opinion on the shared DISTCC_DIR idea)