Patchwork [MinGW] Enable thread-safe DWARF2 EH

login
register
mail settings
Submitter Eric Botcazou
Date June 27, 2010, 7:29 a.m.
Message ID <201006270929.50950.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/57082/
State New
Headers show

Comments

Eric Botcazou - June 27, 2010, 7:29 a.m.
Hi,

testing with our 4.5-based compiler revealed that the new support for DWARF2 
EH isn't thread-safe when DLLs are involved.  Straightforward fix attached.

OK for mainline, 4.5 branch and 4.4 branch?


2010-06-27  Eric Botcazou  <ebotcazou@adacore.com>

	* config/i386/t-mingw32 (SHLIB_LC): Add -lmingwthrd.
	* config/i386/t-mingw-w32 (SHLIB_LC): Likewise.
	* config/i386/t-mingw-w64 (SHLIB_LC): Likewise.

Patch

Index: config/i386/t-mingw-w64
===================================================================
--- config/i386/t-mingw-w64	(revision 161426)
+++ config/i386/t-mingw-w64	(working copy)
@@ -6,7 +6,7 @@  MULTILIB_DIRNAMES = 64 32
 MULTILIB_OSDIRNAMES = ../lib ../lib32
 
 # MinGW-specific parts of LIB_SPEC
-SHLIB_LC = -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
+SHLIB_LC = -lmingwthrd -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
Index: config/i386/t-mingw32
===================================================================
--- config/i386/t-mingw32	(revision 161426)
+++ config/i386/t-mingw32	(working copy)
@@ -2,4 +2,4 @@ 
 NATIVE_SYSTEM_HEADER_DIR = /mingw/include
 
 # MinGW-specific parts of LIB_SPEC
-SHLIB_LC = -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
+SHLIB_LC = -lmingwthrd -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
Index: config/i386/t-mingw-w32
===================================================================
--- config/i386/t-mingw-w32	(revision 161426)
+++ config/i386/t-mingw-w32	(working copy)
@@ -6,7 +6,7 @@  MULTILIB_DIRNAMES = 64 32
 MULTILIB_OSDIRNAMES = ../lib64 ../lib
 
 # MinGW-specific parts of LIB_SPEC
-SHLIB_LC = -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
+SHLIB_LC = -lmingwthrd -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib