[LLVMdev] LLVM+Clang 3.2rc2 MinGW binaries' libstdc++ requirement
root at 32bitmicro.com
Wed Dec 5 22:27:25 PST 2012
> I attempted to run the 3.2rc2 experimental LLVM+Clang package for
> Mingw32/x86 , 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 .
LLVM+Clang 3.2rc2 Mingw32/x86 binaries were built on Windows 7
machine with fresh Minwg32 installation. Minwg32 installation
was performed using latest automated installer and default settings
> 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.
TDM-GCC 4.6 matches g++ version installed with
"g++ --version" reports "g++.exe (GCC) 4.6.2"
> 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.
Another solution would be to rebuild entire LLVM+Clang package using
your g++ 4.7 based Mingw32 dev environment.
> I am wondering whether the Clang project will attempt to match MinGW's
> new ABI. AIUI, the 4.7 breakage is not intended to be a one-time
> event. A stable ABI would be a nice thing.
>  MinGW 4.7 enabled the thiscall convention, which changes the
> register/stack usage for all member function calls. See
>  http://llvm.org/bugs/show_bug.cgi?id=12684
More information about the llvm-dev