This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: Set USE_GTHREAD_WEAK on mingw32 to 0


Hello,

PR 32915 exposed a bug in the configury of GTHREAD_USE_WEAK for mingw32
library host. Normally, mingw32 would not use gthr-posix.h, so the
question of GTHREAD_USE_WEAK would be moot. However, if for whatever
reason, someone want to use gthr-posix.h, then weak references will not
do the right thing on mingw32 if the win32-pthread lib is a dll.

In short, .weak directive, as handled by current gas, does not work if
the symbol is in a win32 dll, since each 'object' of a dll import lib
defines only one symbol.

This fixes.

2007-07-30  Danny Smith  <dannysmit@users.sourceforge.net>

	* acinclude.m4 (GTHREAD_USE_WEAK) Define to 0 for mingw32.
	* configure: Regenerate.


Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 126996)
+++ acinclude.m4	(working copy)
@@ -128,7 +128,7 @@
 	      [Define to 1 if the target supports #pragma weak])
   fi
   case "$host" in
-    *-*-darwin* | *-*-hpux* | *-*-cygwin*)
+    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
       AC_DEFINE(GTHREAD_USE_WEAK, 0,
 		[Define to 0 if the target shouldn't use #pragma weak])
       ;;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]