summaryrefslogtreecommitdiffstats
path: root/0018-prevent-modules-from-being-unloaded-before-their-dto.patch
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-02-21 18:56:00 -0600
committerYaakov Selkowitz <yselkowi@redhat.com>2016-02-21 18:56:00 -0600
commit2426323bbdcaf8d5904f1f243bb2a5066dd21c8a (patch)
tree21ab325f116ab50e84ac20a77bbaf569eb56a469 /0018-prevent-modules-from-being-unloaded-before-their-dto.patch
parentd9caede9a622bfa41c984c4685a7b185421c96d7 (diff)
downloadcygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.tar.gz
cygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.tar.xz
cygwin-gcc-2426323bbdcaf8d5904f1f243bb2a5066dd21c8a.zip
cygwin-gcc 5.3.0
Diffstat (limited to '0018-prevent-modules-from-being-unloaded-before-their-dto.patch')
-rw-r--r--0018-prevent-modules-from-being-unloaded-before-their-dto.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/0018-prevent-modules-from-being-unloaded-before-their-dto.patch b/0018-prevent-modules-from-being-unloaded-before-their-dto.patch
new file mode 100644
index 0000000..898d023
--- /dev/null
+++ b/0018-prevent-modules-from-being-unloaded-before-their-dto.patch
@@ -0,0 +1,27 @@
+From c1d40554910707ad87f9bcef43b537b5d6ca2f78 Mon Sep 17 00:00:00 2001
+From: Jonathan Yong <10walls@gmail.com>
+Date: Fri, 31 Oct 2014 06:46:02 +0800
+Subject: [PATCH 18/21] prevent modules from being unloaded before their dtors
+ are called
+
+---
+ libstdc++-v3/config/os/mingw32-w64/os_defines.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
+index 976355c..b1d048d 100644
+--- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h
++++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
+@@ -86,4 +86,9 @@
+ // See libstdc++/59807
+ #define _GTHREAD_USE_MUTEX_INIT_FUNC 1
+
++// Enable use of GetModuleHandleEx (requires Windows XP/2003) in
++// __cxa_thread_atexit to prevent modules from being unloaded before
++// their dtors are called
++#define _GLIBCXX_THREAD_ATEXIT_WIN32 1
++
+ #endif
+--
+2.4.5
+