OSDN Git Service

only use _darwin10_Unwind_FindEnclosingFunction on darwin >= 10
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Aug 2010 14:54:10 +0000 (14:54 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Aug 2010 14:54:10 +0000 (14:54 +0000)
gcc:
* unwind-dw2-fde-darwin.c (_darwin10_Unwind_FindEnclosingFunction):
Dunmmy function with NULL return unless the target is
OSX >= 10.6 (Darwin10).
libjava:
* include/posix.h: Make substitution of
_darwin10_Unwind_FindEnclosingFunction conditional on
OSX >= 10.6 (Darwin10).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163309 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/unwind-dw2-fde-darwin.c
libjava/ChangeLog
libjava/include/posix.h

index ff72674..61f3c19 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-17  Iain Sandoe  <iains@gcc.gnu.org>
+
+       * unwind-dw2-fde-darwin.c (_darwin10_Unwind_FindEnclosingFunction):
+       Dunmmy function with NULL return unless the target is 
+       OSX >= 10.6 (Darwin10).
+       
 2010-08-17  Jack Howarth <howarth@bromo.med.uc.edu>
 
        * gcc.c (spec_function): Add remove-outfile.
 2010-08-17  Jack Howarth <howarth@bromo.med.uc.edu>
 
        * gcc.c (spec_function): Add remove-outfile.
index a672e93..75b404e 100644 (file)
@@ -276,13 +276,14 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
 }
 
 void *
 }
 
 void *
-_darwin10_Unwind_FindEnclosingFunction (void *pc)
+_darwin10_Unwind_FindEnclosingFunction (void *pc ATTRIBUTE_UNUSED)
 {
 {
+#if __MACH__ && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060)
   struct dwarf_eh_bases bases;
   const struct dwarf_fde *fde = _Unwind_Find_FDE (pc-1, &bases);
   if (fde)
     return bases.func;
   struct dwarf_eh_bases bases;
   const struct dwarf_fde *fde = _Unwind_Find_FDE (pc-1, &bases);
   if (fde)
     return bases.func;
-  else
-    return NULL;
+#endif
+  return NULL;
 }
 
 }
 
index 301f8a1..c986c4d 100644 (file)
@@ -1,3 +1,9 @@
+2010-08-17  Iain Sandoe  <iains@gcc.gnu.org>
+
+       * include/posix.h: Make substitution of 
+       _darwin10_Unwind_FindEnclosingFunction conditional on 
+       OSX >= 10.6 (Darwin10).
+       
 2010-08-12  Tom Tromey  <tromey@redhat.com>
 
        * gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
 2010-08-12  Tom Tromey  <tromey@redhat.com>
 
        * gnu/java/security/jce/prng/natVMSecureRandomWin32.cc
index 61b2a6a..b2cf3cf 100644 (file)
@@ -56,9 +56,9 @@ details.  */
 #define _Jv_platform_solib_suffix ".so"
 #endif
 
 #define _Jv_platform_solib_suffix ".so"
 #endif
 
-#if defined(__APPLE__) && defined(__MACH__)
-#undef _Unwind_FindEnclosingFunction
-#define _Unwind_FindEnclosingFunction(PC) _darwin10_Unwind_FindEnclosingFunction(PC)
+#if __MACH__ && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060)
+#  undef _Unwind_FindEnclosingFunction
+#  define _Unwind_FindEnclosingFunction(PC) _darwin10_Unwind_FindEnclosingFunction(PC)
 #endif
 
 // Some POSIX systems don't have O_SYNC and O_DYSNC so we define them here.
 #endif
 
 // Some POSIX systems don't have O_SYNC and O_DYSNC so we define them here.