With llvm-3.3-r1, clang uses the gcc version set in /etc/env.d/gcc/config-*, but as of llvm-3.3-r2, this has stopped working and now clang uses whichever installed gcc version it finds (which is a gcc-4.9 snapshot for me that isn't supported by clang). As I understand, the build process has been reworked to use cmake instead of make as of llvm-3.3-r2 but I'm still not sure what triggered this change. I'll keep investigating but maybe someone here can spot the problem more quickly.
-r2 was removed on 6 Jan :). -r3 should have this fixed, please try that one and let me know if it works for you.
The corresponding patch was dropped again in 3.4. Reapplying it fixes the problem. I never got around to test 3.3-r3, sorry about that.
Do you mean clang-3.1-gentoo-runtime-gcc-detection-v3.patch? I thought it was fixed upstream. If it isn't, we should do something about it ;/.
Yes, that's the patch I'm talking about. What exactly should have been fixed upstream? As I understand, this patch is very gentoo-specific.
Well, yes. But on the other hand, AFAIR the whole gcc installation issue is very distro-specific and upstream already carries code for various distros including Gentoo. It's just that their Gentoo code is not exactly correct :). Alternatively we could try to find out why Gentoo needs that special handling and try to fix gcc wrapping to not have to patch clang. Not sure if it's feasible or even our fault. Anyway, I'll readd the patch soon enough along with fix for bug #497620.
+ 10 Jan 2014; Michał Górny <mgorny@gentoo.org> llvm-3.4.ebuild: + Re-add missing runtime gcc detection patch, bug #497704. Maybe we should apply it to -9999 as well?