------- Comment #6 from andriys at gmail dot com 2009-08-04 13:41 ------- (In reply to comment #5) > I cannot comment on the build of libsdc++.dll in the mingw 4.4.0 release since > I have not looked at that source. There is a patch file that is shipped along with the mingw 4.4.0 build instructions/script. The patch adds most of the essential things that the Dave Korn's patch does (i.e. __attribute__((dllimport)) decorations and -no-undefined linker option.) I believe the official MinGW binaries were built with that patch applied. Well, there are your E-mail at the top of that patch file...
> Applying Dave Korn's patch mentioned in Comment #2, and linking against > libstdc++.dll, I get this with your original testcaase: > > Expecting 'true', got 'true' > Expecting 'false', got 'false' > Where this patch is supposed to be applied to? trunk? I have looked through the patches you are referring to and through the source in repository. As far as I can see, libsupc++ is still static only, and eh_globals.cc is a part of libsupc++, not libstdc++. The fact that test-case works correctly for you could be just a coincidence. The more reliable way to check for the problem would be to compare the value returned by the __cxa_get_globals() when being from the main executable and from the dll respectively. I'll prepare the new test case. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40918