I don't know what this bastardly thing does but it uses 'g++' instead of my CXX, and moreover it somehow calls g++ directly rather than using distcc wrapper through PATH. I would suspect it hardcodes /usr/bin/g++ somewhere. The results are slow compilation, abuse of build jobs (since distcc limiting doesn't work) and eventually OOM-ing on me.
Ok, it's actually scons' fault. It ignores PATH by default, and build systems have to explicitly force respecting it...
commit cad1e743614674af89fc9fced03594bcab6f20a3 Author: Michał Górny <mgorny@gentoo.org> Date: Fri Jan 1 10:36:29 2016 dev-db/mongodb: [QA] Make SCons respect PATH, #570436 commit 52e99ad8745af634ced0e18fdf76410d14a0233d Author: Michał Górny <mgorny@gentoo.org> Date: Fri Jan 1 09:54:01 2016 dev-db/mongodb: [QA] Respect CC & CXX commit d8d31e5ad00737872046269b339e327bc715f318 Author: Michał Górny <mgorny@gentoo.org> Date: Fri Jan 1 09:52:15 2016 dev-db/mongodb: Convert scons_opts into an array, to preserve whitespace
It would be nice to get this upstream. Or make SCons respect the environment. Or even better make them dump this ugly piece of SCons and use a sane build system. Like waf or something.