From d74703744533a360a30ed5d62a6174072fb3bdf9 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Mon, 20 Feb 2012 22:22:07 +0100 Subject: 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 --- libgcc/ChangeLog | 3 +++ libgcc/gthr.h | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 87b0e9b..61d9b59 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,5 +1,8 @@ 2012-02-20 Kai Tietz + 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. diff --git a/libgcc/gthr.h b/libgcc/gthr.h index 607c26e..03a3ee1 100644 --- a/libgcc/gthr.h +++ b/libgcc/gthr.h @@ -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 -- cgit v1.1