Le 07/09/2015 23:23, Paulo Caetano a écrit : > Hello. > > I've been experimenting building GCC with --enable-libstdcxx-debug, > both on Linux and MSYS2, and there's one thing I'm not sure of and I > wonder if you could help me understand it. > > GCC docs say that configuring GCC with --enable-libstdcxx-debug will > build debug libraries "in addition to what is normally built", i.e., > in addition to the optimized libraries. > > I've tested this on Linux (Fedora 22, gcc 5.2.0), and it works as > expected. It builds two versions of libstdc++.a and a libstdc++.so > (libstdc++.so.6.0.21), which are installed in > <prefix>/lib/gcc/x86_64-redhat-linux/5.2.0 (optimized version, or > "what is normally built"), and in > <prefix>/lib/gcc/x86_64-redhat-linux/5.2.0/debug (debug version). > > However, using --enable-libstdcxx-debug on MSYS2 gives me a different > result. I got a single libstdc++.dll, in <prefix>/bin, and two > versions of libstdc++.a, one in > <prefix>/lib/gcc/x86_64-w64-mingw32/5.2.0 and another in > <prefix>/lib/gcc/x86_64-w64-mingw32/5.2.0/debug. > > My first hypothesis was that --enable-libstdcxx-debug on MSYS2 was not > creating the debug DLL (which I expected to find in > <prefix>/lib/gcc/x86_64-w64-mingw32/5.2.0/debug). However, when I > compared the versions of libstdc++.dll created using > --enable-libstdcxx-debug vs. --disable-libstdcxx-debug, I noticed they > were different. > > So, my conclusion, so far, is that --disable-libstdcxx-debug acts > similar on Linux and MSYS2, and that --enable-libstdcxx-debug, on > MSYS2, has the following behaviour: > - Does not create the libstdc++.dll that is "normally built", i.e., > the optimized version. > - Creates the debug version of libstdc++.dll and installs it in > <prefix>/bin. > - Creates the debug version of libstdc++.a and installs it in > <prefix>/lib/gcc/x86_64-w64-mingw32/5.2.0/debug. > - Created the libstdc++.a that is "normally built", i.e., the > optimized version, and installs it in > <prefix>lib/gcc/x86_64-w64-mingw32/5.2.0. <http://5.2.0.0/> > > Is my reasoning correct, or am I missing something? > > Thanks for your help. > --- > Paulo Caetano > http://cidebycide.blogspot.pt/ Hello,
If i'm right (and i'm not sure to be :P) the problem comes from the Gcc install script which doesn't make special directories for dll. I've experienced this problem in many occasions when compiling a multilib version of Gcc (but with older Gcc versions), and the better way i've found now is to manually create a separate directory for one kind of dlls (will say : 32bits version ... should be debug version in your special case) and to manually copy each dll to them correct place. Hope it helps ;) ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public