Hi,

I am attempting to build functioning multilib toolchains, but I see that
only one version of (most) GCC runtime DLLs are installed. This is with GCC
4.6.3.
For a Linux64 to Win64 cross compiler, I have the following DLLs in the
sysroot/prefix:
(find linux64mingw64/mingw64 -name "*.dll")
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/debug/libstdc++-6.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/libssp-0.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/libwinpthread-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/libstdc++-6.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/libgomp-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/libquadmath-0.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/libgcc_s_sjlj-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib32/libgfortran-3.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/debug/libstdc++-6.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libssp-0.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libwinpthread-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libstdc++-6.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libgomp-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libquadmath-0.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libgcc_s_sjlj-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libgfortran-3.dll

Which is great, and exactly what I expect. For a Win64 to Win64 native
compiler, though, I get the following:
(find mingw64mingw64/mingw64 -name "*.dll")
mingw64mingw64/mingw64/bin/libssp-0.dll
mingw64mingw64/mingw64/bin/libwinpthread-1.dll
mingw64mingw64/mingw64/bin/libstdc++-6.dll
mingw64mingw64/mingw64/bin/libgomp-1.dll
mingw64mingw64/mingw64/bin/libquadmath-0.dll
mingw64mingw64/mingw64/bin/libgcc_s_sjlj-1.dll
mingw64mingw64/mingw64/bin/libgfortran-3.dll
mingw64mingw64/mingw64/lib32/bin/libstdc++-6.dll
mingw64mingw64/mingw64/libexec/gcc/x86_64-w64-mingw32/4.6.3/liblto_plugin-0.dll
mingw64mingw64/mingw64/lib/bin/libstdc++-6.dll

and the other architecture DLLs are nowhere to be found. I believe the
"correct" (aka symmetric) thing to do is to install a native compiler's
"other architecture" DLLs to x86_64-w64-mingw32/lib32 or
i686-w64-mingw32/lib64, as is the case for the cross-compiler. As it stands
now a native multilib compiler built from vanilla sources is useless. I
will check GCC 4.7 to see if this has been fixed, but I fear for the worst
(see PS below).

IMHO, a completely better scheme of things would be dropping the stupid
"lib32"/"lib64", and going for the triplet all the way (and let
"-m32"/"-m64" choose the triplet):
linux64mingw64/mingw64/i686-w64-mingw32/lib/debug/libstdc++-6.dll
linux64mingw64/mingw64/i686-w64-mingw32/lib/libssp-0.dll
linux64mingw64/mingw64/i686-w64-mingw32/lib/libwinpthread-1.dll
linux64mingw64/mingw64/i686-w64-mingw32/lib/libstdc++-6.dll
linux64mingw64/mingw64/i686-w64-mingw32/lib/libgomp-1.dll
linux64mingw64/mingw64/i686-w64-mingw32/lib/libquadmath-0.dll
linux64mingw64/mingw64/i686-w64-mingw32/lib/libgcc_s_sjlj-1.dll
linux64mingw64/mingw64/i686-w64-mingw32/lib/libgfortran-3.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/debug/libstdc++-6.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libssp-0.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libwinpthread-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libstdc++-6.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libgomp-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libquadmath-0.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libgcc_s_sjlj-1.dll
linux64mingw64/mingw64/x86_64-w64-mingw32/lib/libgfortran-3.dll

This would allow for example GMP to be installed into a multilib compiler's
search path (it uses a different gmp.h).

The only solution I see *right now* is one of these:
1. Install the DLLs manually (how stupid)
2. apply runtime DLL renaming patches like TDM. Which is f-ugly as nothing
else does this kind of renaming.

Ideas? Solutions? Cause this has been a problem for over 3 major GCC
versions....

Ruben

PS: GCC bug reports and mailin list posts on this and similar issues
(although never about libgomp/libssp/libquadmath/libgfortran):
http://gcc.gnu.org/ml/gcc-help/2012-07/msg00061.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39947
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47142
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to