http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52300

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-19
                 CC|                            |ktietz at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-19 17:12:13 
UTC ---
As pe-coff doesn't have fully compatible support for weaks to ELF ones, we
should disable it.  In static version it works, but when used in shared variant
it doesn't.

I suggest the following patch to solve this problem:

Index: gthr.h
===================================================================
--- gthr.h      (revision 184333)
+++ gthr.h      (working copy)
@@ -135,6 +135,14 @@
 */

 #if SUPPORTS_WEAK
+/* The pe-coff weak support isn't fully compatible to ELF's weak.
+   For static libraries it might would work, but as we need to deal
+   with shared versions too, we disable it for mingw-targets.  */
+#ifdef __MINGW32__
+#undef GTHREAD_USE_WEAK
+#define GTHREAD_USE_WEAK 0
+#endif
+
 #ifndef GTHREAD_USE_WEAK
 #define GTHREAD_USE_WEAK 1
 #endif

Reply via email to