OSDN Git Service

2012-03-02 Jack Howarth <howarth@bromo.med.uc.edu>
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Mar 2012 18:21:41 +0000 (18:21 +0000)
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Mar 2012 18:21:41 +0000 (18:21 +0000)
Backport from mainline
2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
    Jack Howarth  <howarth@bromo.med.uc.edu>

PR boehm-gc/52179
* include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP.
* include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with
pthread_get_stackaddr_np when available.
* configure.ac (THREADS): Check availability of
pthread_get_stackaddr_np.
* configure: Regenerate.

2012-03-02  Jack Howarth  <howarth@bromo.med.uc.edu>

Backport from mainline
2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
            Jack Howarth  <howarth@bromo.med.uc.edu>

PR target/49461
* configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11.
* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184809 138bc75d-0d04-0410-961f-82ee72b054a4

boehm-gc/ChangeLog
boehm-gc/configure
boehm-gc/configure.ac
boehm-gc/include/gc_config.h.in
boehm-gc/include/private/gcconfig.h
libjava/ChangeLog
libjava/configure
libjava/configure.ac

index 397f087..219a514 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-02  Jack Howarth  <howarth@bromo.med.uc.edu>
+
+       Backport from mainline
+       2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
+                   Jack Howarth  <howarth@bromo.med.uc.edu>
+
+       PR boehm-gc/52179
+       * include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP.
+       * include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with
+       pthread_get_stackaddr_np when available.
+       * configure.ac (THREADS): Check availability of
+       pthread_get_stackaddr_np.
+       * configure: Regenerate.
+
 2012-03-01  Release Manager
 
        * GCC 4.6.3 released.
index a6806b8..019054d 100755 (executable)
@@ -15246,6 +15246,17 @@ _ACEOF
 fi
 done
 
+for ac_func in pthread_get_stackaddr_np
+do :
+  ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np"
+if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PTHREAD_GET_STACKADDR_NP 1
+_ACEOF
+
+fi
+done
+
 LIBS="$oldLIBS"
 
 # Configuration of machine-dependent code
index 61e12aa..412a8f3 100644 (file)
@@ -392,6 +392,7 @@ esac
 oldLIBS="$LIBS"
 LIBS="$LIBS $THREADLIBS"
 AC_CHECK_FUNCS([pthread_getattr_np])
+AC_CHECK_FUNCS([pthread_get_stackaddr_np])
 LIBS="$oldLIBS"
 
 # Configuration of machine-dependent code
index ea6cb03..6bdd807 100644 (file)
@@ -87,6 +87,9 @@
 /* Define to 1 if you have the `pthread_getattr_np' function. */
 #undef HAVE_PTHREAD_GETATTR_NP
 
+/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */
+#undef HAVE_PTHREAD_GET_STACKADDR_NP
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
index c729130..f2b5681 100644 (file)
         These aren't used when dyld support is enabled (it is by default) */
 #     define DATASTART ((ptr_t) get_etext())
 #     define DATAEND   ((ptr_t) get_end())
-#     define STACKBOTTOM ((ptr_t) 0xc0000000)
+#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
+#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
+#     else
+#       define STACKBOTTOM ((ptr_t) 0xc0000000)
+#     endif
 #     define USE_MMAP
 #     define USE_MMAP_ANON
 #     define USE_ASM_PUSH_REGS
         These aren't used when dyld support is enabled (it is by default) */
 #     define DATASTART ((ptr_t) get_etext())
 #     define DATAEND   ((ptr_t) get_end())
-#     define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
+#     ifdef HAVE_PTHREAD_GET_STACKADDR_NP
+#       define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
+#     else
+#       define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
+#     endif
 #     define USE_MMAP
 #     define USE_MMAP_ANON
 #     ifdef GC_DARWIN_THREADS
index 8ee19da..8ba79a6 100644 (file)
@@ -1,3 +1,13 @@
+2012-03-02  Jack Howarth  <howarth@bromo.med.uc.edu>
+
+       Backport from mainline
+       2012-02-23  Patrick Marlier  <patrick.marlier@gmail.com>
+                   Jack Howarth  <howarth@bromo.med.uc.edu>
+
+       PR target/49461
+       * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11.
+       * configure: Regenerate.
+
 2012-03-01  Release Manager
 
        * GCC 4.6.3 released.
index 3a722c7..d660561 100755 (executable)
@@ -19775,14 +19775,9 @@ case "${host}" in
         SYSTEMSPEC="-lunicows $SYSTEMSPEC"
       fi
     ;;
-    *-*-darwin9*)
+    *-*-darwin[912]*)
       SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
     ;;
-    *-*-darwin[12]*)
-      # Something is incompatible with pie, would be nice to fix it and
-      # remove -no_pie.  PR49461
-      SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
-    ;;
     *)
       SYSTEMSPEC=
     ;;
index 276b36f..20dbe96 100644 (file)
@@ -886,14 +886,9 @@ case "${host}" in
         SYSTEMSPEC="-lunicows $SYSTEMSPEC"
       fi
     ;;
-    *-*-darwin9*)
+    *-*-darwin[[912]]*)
       SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
     ;;
-    *-*-darwin[[12]]*)
-      # Something is incompatible with pie, would be nice to fix it and
-      # remove -no_pie.  PR49461
-      SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}"
-    ;;
     *)
       SYSTEMSPEC=
     ;;