summaryrefslogtreecommitdiffstats
path: root/0018-prevent-modules-from-being-unloaded-before-their-dto.patch
diff options
context:
space:
mode:
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
+