Switching to clang system-wide would lead sub-modules build by perl to try and be built with GCC which will fail because the LDFLAGS are incompatible: while updating dev-perl/Socket6 and having clang set system-wide: ... gcc: error: unrecognized command-line option ‘-rtlib=compiler-rt’ Rebuilding perl with clang fixes this, and it means that perl should somehow be aware that the compiler has changed. Reproducible: Always Steps to Reproduce: 1. change compiler to clang/clang++ as per the clang wiki. 2. make sure that perl is not reinstalled. 3. install/update a perl module (for instance dev-perl/Socket6) Actual Results: perl module cannot be installed as it is using GCC as compiler as long as perl isn't rebuilt using clang Expected Results: perl needs to be recompiled automatically when switching compilers. Candidate for tagging in https://bugs.gentoo.org/408963
It's related to bug 408963, yeah, and we can block on it, but this is the same issue as "Perl calls CC directly" and other such bugs. i.e. Perl is known to embed its environment at build-time and other modules then use that same calcified environment. We can't really programmatically know when you've changed compiler For Good. You could just be changing it as a one-off, or for one package, or ... It seems like the best we could really do here is update the Clang wiki page to mention it. *** This bug has been marked as a duplicate of bug 261375 ***