[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:
http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%204.6%20series/4.6.1-tdm-1%20DW2/
gcc-4.6.1-tdm-1-dw2-core.zip
gcc-4.6.1-tdm-1-dw2-c++.zip
gcc-4.6.1-tdm-1-dw2-openmp.zip
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.
[1]
http://llvm.org/pre-releases/3.2/rc2/clang+llvm-3.2rc2-i386-mingw32-EXPERIMENTAL.tar.gz
[2] MinGW 4.7 enabled the thiscall convention, which changes the
register/stack usage for all member function calls. See
http://mingw-users.1079350.n2.nabble.com/MinGW-GCC-4-7-0-released-td7578133.html.
[3] http://llvm.org/bugs/show_bug.cgi?id=12684
-Ryan
More information about the llvm-dev
mailing list