From d4b8abac608cfb0daf61819d84a5882a3a76db05 Mon Sep 17 00:00:00 2001 From: pmarlier Date: Fri, 24 Feb 2012 15:21:12 +0000 Subject: [PATCH] 2012-02-23 Patrick Marlier Jack Howarth boehm-gc/ 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. libjava/ 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/trunk@184555 138bc75d-0d04-0410-961f-82ee72b054a4 --- boehm-gc/ChangeLog | 10 ++++++++++ boehm-gc/configure | 11 +++++++++++ boehm-gc/configure.ac | 1 + boehm-gc/include/gc_config.h.in | 3 +++ boehm-gc/include/private/gcconfig.h | 12 ++++++++++-- libjava/ChangeLog | 7 +++++++ libjava/configure | 7 +------ libjava/configure.ac | 7 +------ 8 files changed, 44 insertions(+), 14 deletions(-) diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index e9d1eb5..173ad80 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,13 @@ +2012-02-23 Patrick Marlier + Jack Howarth + + 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-02-10 Kai Tietz PR boehm-gc/48514 diff --git a/boehm-gc/configure b/boehm-gc/configure index a901e50..c76ea44 100755 --- a/boehm-gc/configure +++ b/boehm-gc/configure @@ -15141,6 +15141,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 diff --git a/boehm-gc/configure.ac b/boehm-gc/configure.ac index a741ca6..2eddc9f 100644 --- a/boehm-gc/configure.ac +++ b/boehm-gc/configure.ac @@ -380,6 +380,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 diff --git a/boehm-gc/include/gc_config.h.in b/boehm-gc/include/gc_config.h.in index ea6cb03..6bdd807 100644 --- a/boehm-gc/include/gc_config.h.in +++ b/boehm-gc/include/gc_config.h.in @@ -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 header file. */ #undef HAVE_STDINT_H diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h index 25fff6e..fb09cf7 100644 --- a/boehm-gc/include/private/gcconfig.h +++ b/boehm-gc/include/private/gcconfig.h @@ -1331,7 +1331,11 @@ 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 @@ -2014,7 +2018,11 @@ 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 diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 326927e..aa45612 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2012-02-23 Patrick Marlier + Jack Howarth + + PR target/49461 + * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11. + * configure: Regenerate. + 2012-02-02 Kai Tietz PR libjava/48512 diff --git a/libjava/configure b/libjava/configure index b8f23d3..8ea1aec 100755 --- a/libjava/configure +++ b/libjava/configure @@ -19788,14 +19788,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= ;; diff --git a/libjava/configure.ac b/libjava/configure.ac index 2b339c3..ce428ca 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -898,14 +898,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= ;; -- 2.7.4