From: Kai Tietz Date: Mon, 20 Feb 2012 21:28:36 +0000 (+0100) Subject: re PR libstdc++/52300 (Gthreads functions linking error at dynamic linking with libst... X-Git-Tag: releases/gcc-4.6.3~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b575958744045cf3c24b337c8312ee5f1344530;p=thirdparty%2Fgcc.git 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: r184408 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ca0177fc066..f07cf6439a3e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-02-20 Kai Tietz + + PR libstdc++/52300 + * gthr.h (GTHREAD_USE_WEAK): Define as zero for mingw. + 2012-02-16 Jakub Jelinek PR debug/52260 diff --git a/gcc/gthr.h b/gcc/gthr.h index 6edfbcd69c38..f4dd96b9e3ad 100644 --- a/gcc/gthr.h +++ b/gcc/gthr.h @@ -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