llvm-gcc4 code lacks static ctors & dtors at least on Linux (mingw has its own technique to handle this and everything is ok there). This breaks many apps, e.q. Qt. The problem will solved (I hope), when crtstuff.c will be properly compiled with llvm-gcc4.
Well, It seems, that LLVM is mature enough to compile crtstuff.c properly with just few minor glitches. Please find attached 2 patches: one for LLVM itself, one for llvm-gcc4 which enables static ctors & dtors at least on linux platform. Test .cpp file is also attached.
Created attachment 423 [details] Patch for llvm-gcc4
Created attachment 424 [details] Patch for LLVM
Created attachment 425 [details] Testcase
"Patch for llvm-gcc4" applies, thanks Anton!
"Patch for LLVM" applied. Thanks!