From c402bcc0139033a365f30e00caecff9f8be40974 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Fri, 7 Nov 2014 22:43:58 +0000
Subject: [PATCH] Define __{de,}register_frame_info in fake libgcc_s

---
 mingw-w64-libraries/winpthreads/Makefile.am                 |  2 +-
 mingw-w64-libraries/winpthreads/src/libgcc/dll_frame_info.c | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 mingw-w64-libraries/winpthreads/src/libgcc/dll_frame_info.c

diff --git a/mingw-w64-libraries/winpthreads/Makefile.am b/mingw-w64-libraries/winpthreads/Makefile.am
index 231c313..6d3b857 100644
--- a/mingw-w64-libraries/winpthreads/Makefile.am
+++ b/mingw-w64-libraries/winpthreads/Makefile.am
@@ -25,7 +25,7 @@ libwinpthread_la_SOURCES = \
 # Break circular dep on bootstrap
 noinst_LIBRARIES = fakelib/libgcc.a  fakelib/libgcc_eh.a  fakelib/libgcc_s.a
 fakelib_libgcc_a_SOURCES = src/libgcc/dll_dependency.S src/libgcc/dll_math.c
-fakelib_libgcc_s_a_SOURCES =
+fakelib_libgcc_s_a_SOURCES = src/libgcc/dll_frame_info.c
 fakelib_libgcc_eh_a_SOURCES =
 endif
 
diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_frame_info.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_frame_info.c
new file mode 100644
index 0000000..115ac12
--- /dev/null
+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_frame_info.c
@@ -0,0 +1,13 @@
+/* Because of:
+   https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gcc/955-4.9.2-apply-hack-so-gcc_s-isnt-stripped.patch
+   .. we need to define these functions.
+*/
+
+void __register_frame_info (__attribute__((unused)) const void *vp, __attribute__((unused)) void *op)
+{
+}
+
+void *__deregister_frame_info (__attribute__((unused)) const void *vp)
+{
+    return (void *)0;
+}
-- 
2.1.3

