[package] forgot to add uclibc++ patch from #5185
authorFlorian Fainelli <florian@openwrt.org>
Tue, 14 Jul 2009 14:39:52 +0000 (14:39 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 14 Jul 2009 14:39:52 +0000 (14:39 +0000)
SVN-Revision: 16842

libs/uclibc++/patches/900-dependent_exception.patch [new file with mode: 0644]

diff --git a/libs/uclibc++/patches/900-dependent_exception.patch b/libs/uclibc++/patches/900-dependent_exception.patch
new file mode 100644 (file)
index 0000000..3a5cb7d
--- /dev/null
@@ -0,0 +1,68 @@
+--- a/src/eh_alloc.cpp 2007-06-03 23:51:13.000000000 +0100
++++ b/src/eh_alloc.cpp 2009-07-13 09:42:39.000000000 +0100
+@@ -42,4 +42,21 @@
+       free( (char *)(vptr) - sizeof(__cxa_exception) );
+ }
++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404
++extern "C" __cxa_dependent_exception* __cxa_allocate_dependent_exception() throw(){
++      __cxa_dependent_exception *retval;
++
++      retval = static_cast<__cxa_dependent_exception*>(malloc(sizeof(__cxa_dependent_exception)));
++      if(0 == retval){
++              std::terminate();
++      }
++      memset (retval, 0, sizeof(__cxa_dependent_exception));
++      return retval ;
++}
++
++extern "C" void __cxa_free_dependent_exception(__cxa_dependent_exception *vptr) throw(){
++      free( vptr );
++}
++#endif
++
+ }
+--- a/include/unwind-cxx.h     2009-07-13 10:01:11.000000000 +0100
++++ b/include/unwind-cxx.h     2009-07-13 10:14:08.000000000 +0100
+@@ -79,6 +79,41 @@
+   _Unwind_Exception unwindHeader;\r
+ };\r
\r
++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 404\r
++// A dependent C++ exception object consists of a wrapper around an unwind\r
++// object header with additional C++ specific information, containing a pointer\r
++// to a primary exception object.\r
++\r
++struct __cxa_dependent_exception\r
++{\r
++  // The primary exception this thing depends on.\r
++  void *primaryException;\r
++\r
++  // The C++ standard has entertaining rules wrt calling set_terminate\r
++  // and set_unexpected in the middle of the exception cleanup process.\r
++  std::unexpected_handler unexpectedHandler;\r
++  std::terminate_handler terminateHandler;\r
++\r
++  // The caught exception stack threads through here.\r
++  __cxa_exception *nextException;\r
++\r
++  // How many nested handlers have caught this exception.  A negated\r
++  // value is a signal that this object has been rethrown.\r
++  int handlerCount;\r
++\r
++  // Cache parsed handler data from the personality routine Phase 1\r
++  // for Phase 2 and __cxa_call_unexpected.\r
++  int handlerSwitchValue;\r
++  const unsigned char *actionRecord;\r
++  const unsigned char *languageSpecificData;\r
++  _Unwind_Ptr catchTemp;\r
++  void *adjustedPtr;\r
++\r
++  // The generic exception header.  Must be last.\r
++  _Unwind_Exception unwindHeader;\r
++};\r
++\r
++#endif\r
+ // Each thread in a C++ program has access to a __cxa_eh_globals object.\r
+ struct __cxa_eh_globals\r
+ {\r