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

From-SVN: r184408

gcc/ChangeLog
gcc/gthr.h

index 7ca0177fc0668d544b8b9fa7548a196464a6c9d5..f07cf6439a3e0377d2297511b3211347838b9327 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-20  Kai Tietz  <ktietz@redhat.com>
+
+       PR libstdc++/52300
+       * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw.
+
 2012-02-16  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/52260
index 6edfbcd69c38c99689b7e287d86045ddb0e8600e..f4dd96b9e3ad53f09157ed64244b5b7977cbb32f 100644 (file)
@@ -155,6 +155,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 /* Include GTHREAD_FILE if one is defined.  */
 #elif defined(HAVE_GTHR_DEFAULT)
 #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