re PR libstdc++/52300 (Gthreads functions linking error at dynamic linking with libst...
authorKai Tietz <ktietz@redhat.com>
Mon, 20 Feb 2012 21:22:07 +0000 (22:22 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Mon, 20 Feb 2012 21:22:07 +0000 (22:22 +0100)
       PR libstdc++/52300
       * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw.

From-SVN: r184406

libgcc/ChangeLog
libgcc/gthr.h

index 87b0e9b50632e40facc5ef139473e938de115476..61d9b591702d4e2f7ca700b1fc2c1fcf69a51014 100644 (file)
@@ -1,5 +1,8 @@
 2012-02-20  Kai Tietz  <ktietz@redhat.com>
 
+       PR libstdc++/52300
+       * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw.
+
        * config.host (i686-*-mingw*): Set md_unwind_header only for dw2-mode
        to w32-unwind.h header.
 
index 607c26eb563f5353886f393586e87896b89115eb..03a3ee1d84fcba3142f3b6051532353fe381a4d9 100644 (file)
@@ -135,6 +135,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 */
 
 #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