From 1d24fc847625989573481939e7d6a2589a4ad839 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 7 Nov 2010 23:34:09 +0000 Subject: This is a revised patch, required for the newer glibc 2.11.x Thanks to lancel00t --- .../glibc.pthread-disable-forced-unwind-check.diff | 141 ++++++--------------- 1 file changed, 38 insertions(+), 103 deletions(-) (limited to '14.0') diff --git a/14.0/glibc/glibc.pthread-disable-forced-unwind-check.diff b/14.0/glibc/glibc.pthread-disable-forced-unwind-check.diff index f779844..65b7b02 100644 --- a/14.0/glibc/glibc.pthread-disable-forced-unwind-check.diff +++ b/14.0/glibc/glibc.pthread-disable-forced-unwind-check.diff @@ -1,14 +1,14 @@ -diff -Naur glibc-2.7/nptl/sysdeps/pthread/configure glibc-2.7-unwind/nptl/sysdeps/pthread/configure ---- glibc-2.7/nptl/sysdeps/pthread/configure 2007-10-18 11:22:23.000000000 +0000 -+++ glibc-2.7-unwind/nptl/sysdeps/pthread/configure 2008-03-30 16:53:42.000000000 +0000 -@@ -24,130 +24,9 @@ +--- configure.old 2010-11-07 16:07:29.000000000 -0600 ++++ configure.new 2010-11-07 16:08:56.000000000 -0600 +@@ -23,139 +23,10 @@ $as_echo "$as_me: error: CFI directive s + esac fi - --{ echo "$as_me:$LINENO: checking for forced unwind support" >&5 --echo $ECHO_N "checking for forced unwind support... $ECHO_C" >&6; } +- +-{ $as_echo "$as_me:$LINENO: checking for forced unwind support" >&5 +-$as_echo_n "checking for forced unwind support... " >&6; } -if test "${libc_cv_forced_unwind+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 +- $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ @@ -34,31 +34,35 @@ diff -Naur glibc-2.7/nptl/sysdeps/pthread/configure glibc-2.7-unwind/nptl/sysdep - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then libc_cv_forced_unwind=yes -else -- echo "$as_me: failed program was:" >&5 +- $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -- + - libc_cv_forced_unwind=no -fi - +-rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi --{ echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5 --echo "${ECHO_T}$libc_cv_forced_unwind" >&6; } +-{ $as_echo "$as_me:$LINENO: result: $libc_cv_forced_unwind" >&5 +-$as_echo "$libc_cv_forced_unwind" >&6; } -if test $libc_cv_forced_unwind = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FORCED_UNWIND 1 @@ -66,10 +70,10 @@ diff -Naur glibc-2.7/nptl/sysdeps/pthread/configure glibc-2.7-unwind/nptl/sysdep - old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror -fexceptions" -- { echo "$as_me:$LINENO: checking for C cleanup handling" >&5 --echo $ECHO_N "checking for C cleanup handling... $ECHO_C" >&6; } +- { $as_echo "$as_me:$LINENO: checking for C cleanup handling" >&5 +-$as_echo_n "checking for C cleanup handling... " >&6; } -if test "${libc_cv_c_cleanup+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 +- $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ @@ -96,112 +100,43 @@ diff -Naur glibc-2.7/nptl/sysdeps/pthread/configure glibc-2.7-unwind/nptl/sysdep - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac --eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err -- } && test -s conftest$ac_exeext && -- $as_test_x conftest$ac_exeext; then +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then libc_cv_c_cleanup=yes -else -- echo "$as_me: failed program was:" >&5 +- $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - libc_cv_c_cleanup=no -fi - +-rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi --{ echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5 --echo "${ECHO_T}$libc_cv_c_cleanup" >&6; } +-{ $as_echo "$as_me:$LINENO: result: $libc_cv_c_cleanup" >&5 +-$as_echo "$libc_cv_c_cleanup" >&6; } - CFLAGS="$old_CFLAGS" - if test $libc_cv_c_cleanup = no; then -- { { echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5 --echo "$as_me: error: the compiler must support C cleanup handling" >&2;} +- { { $as_echo "$as_me:$LINENO: error: the compiler must support C cleanup handling" >&5 +-$as_echo "$as_me: error: the compiler must support C cleanup handling" >&2;} - { (exit 1); exit 1; }; } - fi -else -- { { echo "$as_me:$LINENO: error: forced unwind support is required" >&5 --echo "$as_me: error: forced unwind support is required" >&2;} +- { { $as_echo "$as_me:$LINENO: error: forced unwind support is required" >&5 +-$as_echo "$as_me: error: forced unwind support is required" >&2;} - { (exit 1); exit 1; }; } -fi -diff -Naur glibc-2.7/nptl/sysdeps/pthread/configure.in glibc-2.7-unwind/nptl/sysdeps/pthread/configure.in ---- glibc-2.7/nptl/sysdeps/pthread/configure.in 2003-12-03 06:50:01.000000000 +0000 -+++ glibc-2.7-unwind/nptl/sysdeps/pthread/configure.in 2008-03-30 16:54:50.000000000 +0000 -@@ -19,31 +19,41 @@ - esac - fi - --dnl Iff is available, make sure it is the right one and it --dnl contains struct _Unwind_Exception. --AC_CACHE_CHECK(dnl --for forced unwind support, libc_cv_forced_unwind, [dnl --AC_TRY_LINK([#include ], [ --struct _Unwind_Exception exc; --struct _Unwind_Context *context; --_Unwind_GetCFA (context)], --libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)]) --if test $libc_cv_forced_unwind = yes; then -- AC_DEFINE(HAVE_FORCED_UNWIND) --dnl Check for C cleanup handling. -- old_CFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS -Werror -fexceptions" -- AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl -- AC_TRY_LINK([ --#include --void cl (void *a) { }], [ -- int a __attribute__ ((cleanup (cl))); -- puts ("test")], --libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)]) -- CFLAGS="$old_CFLAGS" -- if test $libc_cv_c_cleanup = no; then -- AC_MSG_ERROR([the compiler must support C cleanup handling]) -- fi --else -- AC_MSG_ERROR(forced unwind support is required) --fi -+dnl These link tests made bootstrapping EGLIBC difficult (how do you -+dnl link if you haven't built a libc yet?), and this test is only used -+dnl to produce an error message anyway. We've already checked the -+dnl GCC, as, and ld versions in the top-level configure script, and we -+dnl only use the results of these tests to produce an error message, -+dnl so we just disable these tests entirely. -+dnl -+dnl dnl Iff is available, make sure it is the right one and it -+dnl dnl contains struct _Unwind_Exception. -+dnl AC_CACHE_CHECK(dnl -+dnl for forced unwind support, libc_cv_forced_unwind, [dnl -+dnl AC_TRY_LINK([#include ], [ -+dnl struct _Unwind_Exception exc; -+dnl struct _Unwind_Context *context; -+dnl _Unwind_GetCFA (context)], -+dnl libc_cv_forced_unwind=yes, libc_cv_forced_unwind=no)]) -+dnl if test $libc_cv_forced_unwind = yes; then -+dnl AC_DEFINE(HAVE_FORCED_UNWIND) -+dnl dnl Check for C cleanup handling. -+dnl old_CFLAGS="$CFLAGS" -+dnl CFLAGS="$CFLAGS -Werror -fexceptions" -+dnl AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl -+dnl AC_TRY_LINK([ -+dnl #include -+dnl void cl (void *a) { }], [ -+dnl int a __attribute__ ((cleanup (cl))); -+dnl puts ("test")], -+dnl libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)]) -+dnl CFLAGS="$old_CFLAGS" -+dnl if test $libc_cv_c_cleanup = no; then -+dnl AC_MSG_ERROR([the compiler must support C cleanup handling]) -+dnl fi -+dnl else -+dnl AC_MSG_ERROR(forced unwind support is required) -+dnl fi -+libc_cv_forced_unwind=yes -+AC_DEFINE(HAVE_FORCED_UNWIND) -+libc_cv_c_cleanup=yes -- cgit v1.2.3