diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-13 21:15:31 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-13 21:15:31 +0000 |
commit | 177cc56cf225e09e18161e72d2f369be27b22119 (patch) | |
tree | dc6a0f80d4e52e052312acffbba59b37f142e9ef /libobjc | |
parent | ee8d553071a6e314f2b4bab7bfc8a6384cc11bc4 (diff) | |
download | gcc-177cc56cf225e09e18161e72d2f369be27b22119.tar.gz |
config/
* sjlj.m4: New file.
libgcc/
* configure.ac: Include config/sjlj.m4.
Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust.
* config.in: Regenerate.
* configure: Likewise.
* config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions.
libjava/
* configure.ac: Include config/sjlj.m4.
Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust.
* include/config.h.in: Regenerate.
* configure: Likewise.
* exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__.
* stacktrace.cc: Likewise.
* include/default-signal.h: Likewise.
* sysdep/i386/backtrace.h: Likewise.
libobjc/
* configure.ac: Remove manual SJLJ check.
* config.h.in: Regenerate.
* configure: Likewise.
* exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__.
libstdc++-v3/
* acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete.
* configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS.
* config.h.in: Regenerate.
* configure: Likewise.
* libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by
__USING_SJLJ_EXCEPTIONS__.
* libsupc++/eh_throw.cc: Likewise.
* libsupc++/eh_ptr.cc: Likewise.
* doc/html/manual/appendix_porting.html: Remove
GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
* doc/xml/manual/build_hacking.xml: Likewise.
* doc/html/manual/configure.html: Remove --enable-sjlj-exceptions.
* doc/xml/manual/configure.xml: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc')
-rw-r--r-- | libobjc/ChangeLog | 7 | ||||
-rw-r--r-- | libobjc/config.h.in | 3 | ||||
-rwxr-xr-x | libobjc/configure | 72 | ||||
-rw-r--r-- | libobjc/configure.ac | 54 | ||||
-rw-r--r-- | libobjc/exception.c | 10 |
5 files changed, 14 insertions, 132 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 9a9fd3d3b15..f176fd0fc45 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,10 @@ +2015-05-13 Eric Botcazou <ebotcazou@adacore.com> + + * configure.ac: Remove manual SJLJ check. + * config.h.in: Regenerate. + * configure: Likewise. + * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. + 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com> * aclocal.m4: Regenerated with automake-1.11.6. diff --git a/libobjc/config.h.in b/libobjc/config.h.in index 20d1fcaf329..0f3dbf2264b 100644 --- a/libobjc/config.h.in +++ b/libobjc/config.h.in @@ -67,8 +67,5 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define if the compiler is configured for setjmp/longjmp exceptions. */ -#undef SJLJ_EXCEPTIONS - /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/libobjc/configure b/libobjc/configure index 2f71735f255..55fcc33dbe2 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -721,7 +721,6 @@ enable_fast_install with_gnu_ld enable_libtool_lock enable_tls -enable_sjlj_exceptions ' ac_precious_vars='build_alias host_alias @@ -1355,8 +1354,6 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-tls Use thread-local storage [default=yes] - --enable-sjlj-exceptions - force use of builtin_setjmp for exceptions Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -10601,7 +10598,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10604 "configure" +#line 10601 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10707,7 +10704,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10710 "configure" +#line 10707 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11465,71 +11462,6 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exception model to use" >&5 -$as_echo_n "checking for exception model to use... " >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# Check whether --enable-sjlj-exceptions was given. -if test "${enable_sjlj_exceptions+set}" = set; then : - enableval=$enable_sjlj_exceptions; : -else - cat > conftest.$ac_ext << EOF -#line 11481 "configure" -@interface Frob -@end -@implementation Frob -@end -int proc(); -int foo() -{ - @try { - return proc(); - } - @catch (Frob* ex) { - return 0; - } -} -EOF -old_CFLAGS="$CFLAGS" -CFLAGS="-x objective-c -fgnu-runtime -fobjc-exceptions -S" -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then - enable_sjlj_exceptions=yes - elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then - enable_sjlj_exceptions=no - fi -fi -CFLAGS="$old_CFLAGS" -rm -f conftest* -fi - -if test x$enable_sjlj_exceptions = xyes; then - -$as_echo "#define SJLJ_EXCEPTIONS 1" >>confdefs.h - - ac_exception_model_name=sjlj -elif test x$enable_sjlj_exceptions = xno; then - ac_exception_model_name="call frame" -else - as_fn_error "unable to detect exception model" "$LINENO" 5 -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_exception_model_name" >&5 -$as_echo "$ac_exception_model_name" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the type of bitfields matters" >&5 $as_echo_n "checking if the type of bitfields matters... " >&6; } diff --git a/libobjc/configure.ac b/libobjc/configure.ac index 2d88519f644..884194abe19 100644 --- a/libobjc/configure.ac +++ b/libobjc/configure.ac @@ -212,60 +212,6 @@ AC_CHECK_HEADERS(sched.h) # Check if we have thread-local storage GCC_CHECK_TLS -AC_MSG_CHECKING([for exception model to use]) -AC_LANG_PUSH(C) -AC_ARG_ENABLE(sjlj-exceptions, - AS_HELP_STRING([--enable-sjlj-exceptions], - [force use of builtin_setjmp for exceptions]), -[:], -[dnl Botheration. Now we've got to detect the exception model. -dnl Link tests against libgcc.a are problematic since -- at least -dnl as of this writing -- we've not been given proper -L bits for -dnl single-tree newlib and libgloss. -dnl -dnl This is what AC_TRY_COMPILE would do if it didn't delete the -dnl conftest files before we got a change to grep them first. -cat > conftest.$ac_ext << EOF -[#]line __oline__ "configure" -@interface Frob -@end -@implementation Frob -@end -int proc(); -int foo() -{ - @try { - return proc(); - } - @catch (Frob* ex) { - return 0; - } -} -EOF -old_CFLAGS="$CFLAGS" -dnl work around that we don't have Objective-C support in autoconf -CFLAGS="-x objective-c -fgnu-runtime -fobjc-exceptions -S" -if AC_TRY_EVAL(ac_compile); then - if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then - enable_sjlj_exceptions=yes - elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then - enable_sjlj_exceptions=no - fi -fi -CFLAGS="$old_CFLAGS" -rm -f conftest*]) -if test x$enable_sjlj_exceptions = xyes; then - AC_DEFINE(SJLJ_EXCEPTIONS, 1, - [Define if the compiler is configured for setjmp/longjmp exceptions.]) - ac_exception_model_name=sjlj -elif test x$enable_sjlj_exceptions = xno; then - ac_exception_model_name="call frame" -else - AC_MSG_ERROR([unable to detect exception model]) -fi -AC_LANG_POP(C) -AC_MSG_RESULT($ac_exception_model_name) - gt_BITFIELD_TYPE_MATTERS # ------ diff --git a/libobjc/exception.c b/libobjc/exception.c index d6eb5dbe2a2..1cc837bbdb4 100644 --- a/libobjc/exception.c +++ b/libobjc/exception.c @@ -199,10 +199,10 @@ get_ttype_entry (struct lsda_header_info *info, _Unwind_Word i) /* Using a different personality function name causes link failures when trying to mix code using different exception handling models. */ -#ifdef SJLJ_EXCEPTIONS +#ifdef __USING_SJLJ_EXCEPTIONS__ #define PERSONALITY_FUNCTION __gnu_objc_personality_sj0 #define __builtin_eh_return_data_regno(x) x -#elif defined(__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) +#elif defined(__SEH__) #define PERSONALITY_FUNCTION __gnu_objc_personality_imp #else #define PERSONALITY_FUNCTION __gnu_objc_personality_v0 @@ -329,7 +329,7 @@ PERSONALITY_FUNCTION (int version, action_record = 0; handler_switch_value = 0; -#ifdef SJLJ_EXCEPTIONS +#ifdef __USING_SJLJ_EXCEPTIONS__ /* The given "IP" is an index into the call-site table, with two exceptions -- -1 means no-action, and 0 means terminate. But since we're using uleb128 values, we've not got random access to @@ -380,7 +380,7 @@ PERSONALITY_FUNCTION (int version, goto found_something; } } -#endif /* SJLJ_EXCEPTIONS */ +#endif /* __USING_SJLJ_EXCEPTIONS__ */ /* If ip is not present in the table, C++ would call terminate. */ /* ??? As with Java, it's perhaps better to tweek the LSDA to that @@ -508,7 +508,7 @@ objc_exception_throw (id exception) header->base.exception_cleanup = __objc_exception_cleanup; header->value = exception; -#ifdef SJLJ_EXCEPTIONS +#ifdef __USING_SJLJ_EXCEPTIONS__ _Unwind_SjLj_RaiseException (&header->base); #else _Unwind_RaiseException (&header->base); |