summaryrefslogtreecommitdiffstats
path: root/gcc48-__cxa_atexit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gcc48-__cxa_atexit.patch')
-rw-r--r--gcc48-__cxa_atexit.patch9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc48-__cxa_atexit.patch b/gcc48-__cxa_atexit.patch
index fd1ce9b..bcff00a 100644
--- a/gcc48-__cxa_atexit.patch
+++ b/gcc48-__cxa_atexit.patch
@@ -29,7 +29,7 @@
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
--- origsrc/gcc-4.8.3/libgcc/config/i386/cygming-crtbegin.c 2014-08-01 15:20:08.998477100 -0500
+++ src/gcc-4.8.3/libgcc/config/i386/cygming-crtbegin.c 2014-08-06 23:54:59.133581500 -0500
-@@ -81,6 +81,23 @@ static void *__JCR_LIST__[]
+@@ -81,6 +81,24 @@ static void *__JCR_LIST__[]
= { };
#endif
@@ -47,13 +47,14 @@
+void *__dso_handle = 0;
+#endif
+
++extern int __cxa_atexit (void (*)(void *), void *, void *);
+#endif /* __CYGWIN__ */
+
+
/* Pull in references from libgcc.a(unwind-dw2-fde.o) in the
startfile. These are referenced by a ctor and dtor in crtend.o. */
extern void __gcc_register_frame (void);
-@@ -131,6 +148,13 @@ __gcc_register_frame (void)
+@@ -131,6 +148,17 @@ __gcc_register_frame (void)
register_class_fn (__JCR_LIST__);
}
#endif
@@ -62,7 +63,11 @@
+ /* If we use the __cxa_atexit method to register C++ dtors
+ at object construction, also use atexit to register eh frame
+ info cleanup. */
++#ifdef __CYGWIN__
++ __cxa_atexit(__gcc_deregister_frame, NULL, (void *)&__dso_handle);
++#else
+ atexit(__gcc_deregister_frame);
++#endif /* __CYGWIN__ */
+#endif /* DEFAULT_USE_CXA_ATEXIT */
}