[LLVMdev] LLVM+Clang 3.2rc2 MinGW binaries' libstdc++ requirement

Ryan Prichard ryan.prichard at gmail.com
Wed Dec 5 20:14:29 PST 2012

I attempted to run the 3.2rc2 experimental LLVM+Clang package for 
Mingw32/x86 [1], and ran into difficulty finding a suitable version of 
MinGW to run it with.  Part of the problem is that Windows G++ changed 
its C++ ABI in 4.7 [2].

Through experimentation, I've determined that the LLVM binaries do not 
run using the libraries shipped with TDM-GCC 4.5 because there is a 
missing symbol.  They segfault with TDM-GCC 4.7, which I assume is 
caused by the ABI change.  (Through inspection of the assembly, it 
appears that Clang was not built with 4.7 -- the code doesn't use 
thiscall.)  TDM-GCC 4.6 is just right, though, so perhaps that should be 
noted somewhere.  Perhaps the filename should include something like 
"mingw32-46" in it.

I had to download these three files to run LLVM binaries:



The openmp package is needed for pthreadGC2.dll.  It's also important to 
use DW2.  TDM-GCC also provides SJLJ libraries that do not work with Clang.

I am wondering whether the Clang project will attempt to match MinGW's 
new ABI.[3]  AIUI, the 4.7 breakage is not intended to be a one-time 
event.  A stable ABI would be a nice thing.


[2] MinGW 4.7 enabled the thiscall convention, which changes the 
register/stack usage for all member function calls.  See 

[3] http://llvm.org/bugs/show_bug.cgi?id=12684


More information about the llvm-dev mailing list