re PR libstdc++/52300 (Gthreads functions linking error at dynamic linking with libstdc++ when using MinGW.)

PR libstdc++/52300
       * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw.

From-SVN: r184406
This commit is contained in:
Kai Tietz 2012-02-20 22:22:07 +01:00 committed by Kai Tietz
parent 0c0c63986e
commit d747037445
2 changed files with 11 additions and 0 deletions

View 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.

View 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