]> gcc.gnu.org Git - gcc.git/commitdiff
sjlj.m4: New file.
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 13 May 2015 21:15:31 +0000 (21:15 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 13 May 2015 21:15:31 +0000 (21:15 +0000)
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.

From-SVN: r223181

31 files changed:
config/ChangeLog
config/sjlj.m4 [new file with mode: 0644]
libgcc/ChangeLog
libgcc/config.host
libgcc/config.in
libgcc/configure
libgcc/configure.ac
libjava/ChangeLog
libjava/configure.ac
libjava/exception.cc
libjava/include/config.h.in
libjava/include/default-signal.h
libjava/stacktrace.cc
libjava/sysdep/i386/backtrace.h
libobjc/ChangeLog
libobjc/config.h.in
libobjc/configure
libobjc/configure.ac
libobjc/exception.c
libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/config.h.in
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/doc/html/manual/appendix_porting.html
libstdc++-v3/doc/html/manual/configure.html
libstdc++-v3/doc/xml/manual/build_hacking.xml
libstdc++-v3/doc/xml/manual/configure.xml
libstdc++-v3/libsupc++/eh_personality.cc
libstdc++-v3/libsupc++/eh_ptr.cc
libstdc++-v3/libsupc++/eh_throw.cc

index d62ae4ce6c876d554002fb11267ac86a35202cab..af46a1144ff652d1a86e157b80a00e7930489cba 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * sjlj.m4: New file.
+
 2015-05-04  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
        * bitfields.m4: Change int to long long, and use bitfields of
diff --git a/config/sjlj.m4 b/config/sjlj.m4
new file mode 100644 (file)
index 0000000..71c8b31
--- /dev/null
@@ -0,0 +1,12 @@
+dnl Check if the compiler is configured for setjmp/longjmp exceptions.
+AC_DEFUN([GCC_CHECK_SJLJ_EXCEPTIONS],
+  [AC_CACHE_CHECK([whether the compiler is configured for setjmp/longjmp exceptions],
+    ac_cv_sjlj_exceptions,
+    [AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+        [[#ifdef __USING_SJLJ_EXCEPTIONS__
+          this will fail
+          #endif]],
+        [[int i;]])],
+      [ac_cv_sjlj_exceptions=no],
+      [ac_cv_sjlj_exceptions=yes])])])
index 1b53c4d7cc62e4b1d87902ad84e2b2e34e1d1e12..7e99ca6138dd367db563dae4c70e5c93885bd900 100644 (file)
@@ -1,3 +1,11 @@
+2015-05-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * 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.
+
 2015-05-12  Uros Bizjak  <ubizjak@gmail.com>
 
        * libgcov-util.c: Add space between string literal and macro name.
index d558c383631db089c1aa0c6a7cfcdfdb25d1bf91..925db2910a2536eaab2c395128ae27da222b813d 100644 (file)
@@ -499,7 +499,7 @@ hppa*64*-*-linux*)
 hppa*-*-linux*)
        tmake_file="$tmake_file pa/t-linux t-slibgcc-libgcc"
        # Set the libgcc version number
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
        else
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
@@ -510,7 +510,7 @@ hppa*-*-linux*)
 hppa[12]*-*-hpux10*)
        tmake_file="$tmake_file pa/t-hpux pa/t-hpux10 t-libgcc-pic t-slibgcc"
        # Set the libgcc version number
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
        else
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
@@ -521,7 +521,7 @@ hppa[12]*-*-hpux10*)
 hppa*64*-*-hpux11*)
        tmake_file="$tmake_file pa/t-hpux pa/t-pa64 pa/t-stublib t-libgcc-pic t-slibgcc"
        # Set the libgcc version number
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
        else
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
@@ -534,7 +534,7 @@ hppa*64*-*-hpux11*)
 hppa[12]*-*-hpux11*)
        tmake_file="$tmake_file pa/t-hpux pa/t-stublib t-libgcc-pic t-slibgcc"
        # Set the libgcc version number
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
            tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
        else
            tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
@@ -635,7 +635,7 @@ i[34567]86-*-cygwin*)
                extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
        fi
        # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
                tmake_eh_file="i386/t-sjlj-eh"
        else
                tmake_eh_file="i386/t-dw2-eh"
@@ -654,7 +654,7 @@ x86_64-*-cygwin*)
                extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
        fi
        # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
                tmake_eh_file="i386/t-sjlj-eh"
        else
                tmake_eh_file="i386/t-seh-eh"
@@ -682,7 +682,7 @@ i[34567]86-*-mingw*)
            ;;
        esac
        # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
                tmake_eh_file="i386/t-sjlj-eh"
        else
                tmake_eh_file="i386/t-dw2-eh"
@@ -706,7 +706,7 @@ x86_64-*-mingw*)
            ;;
        esac
        # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
-       if test x$enable_sjlj_exceptions = xyes; then
+       if test x$ac_cv_sjlj_exceptions = xyes; then
                tmake_eh_file="i386/t-sjlj-eh"
        else
                tmake_eh_file="i386/t-seh-eh"
@@ -799,9 +799,9 @@ m68k-*-linux*)                      # Motorola m68k's running GNU/Linux
                                # with ELF format using glibc 2
                                # aka the GNU/Linux C library 6.
        tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
-       # If not configured with --enable-sjlj-exceptions, bump the
+       # If not configured with setjmp/longjmp exceptions, bump the
        # libgcc version number.
-       if test x$enable_sjlj_exceptions != xyes; then
+       if test x$ac_cv_sjlj_exceptions != xyes; then
            tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
        fi
        md_unwind_header=m68k/linux-unwind.h
index 57fdec1f508b3b0215af59e4d86bf3583159bb7d..59a79618c0e9af7fd614f337d234332cf028e2b9 100644 (file)
@@ -39,9 +39,6 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define if the C compiler is configured for setjmp/longjmp exceptions. */
-#undef LIBGCC_SJLJ_EXCEPTIONS
-
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
index e911a9dcb466fdd77483894e513acda29f570d24..ce66d1dd3126b320ccc1339f75e8e652961ab0e6 100644 (file)
@@ -670,7 +670,6 @@ enable_maintainer_mode
 with_build_libsubdir
 enable_decimal_float
 with_system_libunwind
-enable_sjlj_exceptions
 enable_explicit_exception_frame_registration
 with_glibc_version
 enable_tls
@@ -1308,8 +1307,6 @@ Optional Features:
                        enable decimal float extension to C.  Selecting 'bid'
                        or 'dpd' choses which decimal floating point format
                        to use
-  --enable-sjlj-exceptions
-                          force use of builtin_setjmp for exceptions
   --enable-explicit-exception-frame-registration
                           register exception tables explicitly at module
                           start, for use e.g. for compatibility with
@@ -4539,80 +4536,43 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
   fi
 
 
-# The sjlj test is almost duplicated here and in libgo/configure.ac (for C),
-# libstdc++-v3/acinclude.m4 and libjava/configure.ac (for C++), and
-# libobjc/configure.ac (for Objective-C).
-# FIXME: This should be centralized in config/sjlj.m4.
-# Check whether --enable-sjlj-exceptions was given.
-if test "${enable_sjlj_exceptions+set}" = set; then :
-  enableval=$enable_sjlj_exceptions; case "$enableval" in
-   yes|no|auto) ;;
-   *) as_fn_error "unknown argument to --enable-sjlj-exceptions" "$LINENO" 5 ;;
-   esac
-else
-  enable_sjlj_exceptions=auto
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use setjmp/longjmp exceptions" >&5
-$as_echo_n "checking whether to use setjmp/longjmp exceptions... " >&6; }
-if test "${libgcc_cv_lib_sjlj_exceptions+set}" = set; then :
+# Check if the compiler is configured for setjmp/longjmp exceptions.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is configured for setjmp/longjmp exceptions" >&5
+$as_echo_n "checking whether the compiler is configured for setjmp/longjmp exceptions... " >&6; }
+if test "${ac_cv_sjlj_exceptions+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-void bar ();
-void clean (int *);
-void foo ()
+#ifdef __USING_SJLJ_EXCEPTIONS__
+          this will fail
+          #endif
+int
+main ()
 {
-  int i __attribute__ ((cleanup (clean)));
-  bar();
+int i;
+  ;
+  return 0;
 }
-
 _ACEOF
-CFLAGS_hold=$CFLAGS
-CFLAGS="--save-temps -fexceptions"
-libgcc_cv_lib_sjlj_exceptions=unknown
-if ac_fn_c_try_compile; then :
-  if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-    libgcc_cv_lib_sjlj_exceptions=yes
-  elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
-    libgcc_cv_lib_sjlj_exceptions=no
-  fi
-fi
-CFLAGS=$CFLAGS_hold
-rm -f conftest*
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sjlj_exceptions=no
+else
+  ac_cv_sjlj_exceptions=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_lib_sjlj_exceptions" >&5
-$as_echo "$libgcc_cv_lib_sjlj_exceptions" >&6; }
-
-if test "$enable_sjlj_exceptions" = "auto"; then
-  enable_sjlj_exceptions=$libgcc_cv_lib_sjlj_exceptions
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-case $enable_sjlj_exceptions in
-yes)
-
-$as_echo "#define LIBGCC_SJLJ_EXCEPTIONS 1" >>confdefs.h
-
-  ;;
-no)
-  ;;
-*)
-  as_fn_error "unable to detect exception model" "$LINENO" 5
-  ;;
-esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sjlj_exceptions" >&5
+$as_echo "$ac_cv_sjlj_exceptions" >&6; }
 
 # Check whether --enable-explicit-exception-frame-registration was given.
 if test "${enable_explicit_exception_frame_registration+set}" = set; then :
   enableval=$enable_explicit_exception_frame_registration;
 force_explicit_eh_registry=
 if test "$enable_explicit_exception_frame_registration" = yes; then
-  if test "$enable_sjlj_exceptions" = yes; then
-    as_fn_error "Can't enable both of --enable-sjlj-exceptions
-                  and --enable-explicit-exception-frame-registration" "$LINENO" 5
+  if test $ac_cv_sjlj_exceptions = yes; then
+    as_fn_error "Can't --enable-explicit-exception-frame-registration
+                  with setjmp/longjmp exceptions" "$LINENO" 5
   fi
   force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS
 fi
index 48fd5b9abc1beac8ec9e8719f74715deca1c9aed..dfabd808d11a360dc4e265ffe75a8f004af1956a 100644 (file)
@@ -10,6 +10,7 @@ sinclude(../config/picflag.m4)
 sinclude(../config/dfp.m4)
 sinclude(../config/unwind_ipinfo.m4)
 sinclude(../config/gthr.m4)
+sinclude(../config/sjlj.m4)
 
 AC_PREREQ(2.64)
 AC_INIT([GNU C Runtime Library], 1.0,,[libgcc])
@@ -230,59 +231,8 @@ AC_SUBST(fixed_point)
 # config.gcc also contains tests of with_system_libunwind.
 GCC_CHECK_UNWIND_GETIPINFO
 
-# The sjlj test is almost duplicated here and in libgo/configure.ac (for C),
-# libstdc++-v3/acinclude.m4 and libjava/configure.ac (for C++), and
-# libobjc/configure.ac (for Objective-C).
-# FIXME: This should be centralized in config/sjlj.m4.
-AC_ARG_ENABLE(sjlj-exceptions,
-  AC_HELP_STRING([--enable-sjlj-exceptions],
-                [force use of builtin_setjmp for exceptions]),
-  [case "$enableval" in
-   yes|no|auto) ;;
-   *) AC_MSG_ERROR([unknown argument to --enable-sjlj-exceptions]) ;;
-   esac],
-  [enable_sjlj_exceptions=auto])
-
-AC_CACHE_CHECK([whether to use setjmp/longjmp exceptions],
-[libgcc_cv_lib_sjlj_exceptions],
-[AC_LANG_CONFTEST(
-  [AC_LANG_SOURCE([
-void bar ();
-void clean (int *);
-void foo ()
-{
-  int i __attribute__ ((cleanup (clean)));
-  bar();
-}
-])])
-CFLAGS_hold=$CFLAGS
-CFLAGS="--save-temps -fexceptions"
-libgcc_cv_lib_sjlj_exceptions=unknown
-AS_IF([ac_fn_c_try_compile],
-  [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-    libgcc_cv_lib_sjlj_exceptions=yes
-  elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
-    libgcc_cv_lib_sjlj_exceptions=no
-  fi])
-CFLAGS=$CFLAGS_hold
-rm -f conftest*
-])
-
-if test "$enable_sjlj_exceptions" = "auto"; then
-  enable_sjlj_exceptions=$libgcc_cv_lib_sjlj_exceptions
-fi
-
-case $enable_sjlj_exceptions in
-yes)
-  AC_DEFINE(LIBGCC_SJLJ_EXCEPTIONS, 1,
-       [Define if the C compiler is configured for setjmp/longjmp exceptions.])
-  ;;
-no)
-  ;;
-*)
-  AC_MSG_ERROR([unable to detect exception model])
-  ;;
-esac
+# Check if the compiler is configured for setjmp/longjmp exceptions.
+GCC_CHECK_SJLJ_EXCEPTIONS
 
 AC_ARG_ENABLE([explicit-exception-frame-registration],
   [AC_HELP_STRING([--enable-explicit-exception-frame-registration],
@@ -291,9 +241,9 @@ AC_ARG_ENABLE([explicit-exception-frame-registration],
 [
 force_explicit_eh_registry=
 if test "$enable_explicit_exception_frame_registration" = yes; then
-  if test "$enable_sjlj_exceptions" = yes; then
-    AC_MSG_ERROR([Can't enable both of --enable-sjlj-exceptions
-                  and --enable-explicit-exception-frame-registration])
+  if test $ac_cv_sjlj_exceptions = yes; then
+    AC_MSG_ERROR([Can't --enable-explicit-exception-frame-registration
+                  with setjmp/longjmp exceptions])
   fi
   force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS
 fi
index c3b474633c57283ef36cd47970081b609d1afde3..17650b1d35fd2611f81ad4a292be572f3fb2175e 100644 (file)
@@ -1,3 +1,14 @@
+2015-05-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * 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.
+
 2015-05-13  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
 
        * Makefile.in: Regenerated with automake-1.11.6.
index 01c436d852d32e029343b98753b2ca128cb1cee0..00bbd36075913f3cc83ed70cf14a02e17bc7d3b6 100644 (file)
@@ -1,4 +1,7 @@
 dnl # Process this with autoconf to create configure
+
+sinclude(../config/sjlj.m4)
+
 AC_PREREQ(2.64)
 # Still use "libjava" here to placate dejagnu.
 AC_INIT([libjava], [version-unused],, [libjava])
@@ -699,58 +702,10 @@ INTERPRETER="$libgcj_interpreter"
 AC_SUBST(INTERPRETER)
 AM_CONDITIONAL(INTERPRETER, test "$libgcj_interpreter" = yes)
 
-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"
-struct S { ~S(); };
-void bar();
-void foo()
-{
-  S s;
-  bar();
-}
-EOF
-old_CXXFLAGS="$CXXFLAGS"  
-CXXFLAGS=-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
-  elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
-    # ARM EH ABI.
-    enable_sjlj_exceptions=no
-  fi
-fi
-CXXFLAGS="$old_CXXFLAGS"
-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)
-
-# If we are non using SJLJ exceptions, and this host does not have support 
+# If we are not using SJLJ exceptions, and this host does not have support 
 # for unwinding from a signal handler, enable checked dereferences and divides.
-if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
+GCC_CHECK_SJLJ_EXCEPTIONS
+if test $ac_cv_sjlj_exceptions = no && test $can_unwind_signal = no; then
   CHECKREFSPEC=-fcheck-references
   DIVIDESPEC=-fuse-divide-subroutine
   EXCEPTIONSPEC=
@@ -1761,7 +1716,7 @@ case "${host}" in
 esac
 
 # If we're using sjlj exceptions, forget what we just learned.
-if test "$enable_sjlj_exceptions" = yes; then
+if test "$ac_cv_sjlj_exceptions" = yes; then
    SIGNAL_HANDLER=include/default-signal.h
    SIGNAL_HANDLER_AUX=
 fi
index cc5ab7c5355f537c9a2652ff8f5f187df1d87ef2..61734a96794e9bed340313f34d6cf1f711d2b551 100644 (file)
@@ -112,7 +112,7 @@ _Jv_Throw (jthrowable value)
 
   /* We're happy with setjmp/longjmp exceptions or region-based
      exception handlers: entry points are provided here for both.  */
-#ifdef SJLJ_EXCEPTIONS
+#ifdef __USING_SJLJ_EXCEPTIONS__
   _Unwind_SjLj_RaiseException (&xh->unwindHeader);
 #else
   _Unwind_RaiseException (&xh->unwindHeader);
@@ -194,7 +194,7 @@ get_ttype_entry (_Unwind_Context *context, lsda_header_info *info, long 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   __gcj_personality_sj0
 #define __builtin_eh_return_data_regno(x) x
 #elif defined (__SEH__)
@@ -331,7 +331,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
@@ -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.
   // ??? It is perhaps better to tweek the LSDA so that no-action
index 8e718ac2fd1507d2484601f22eb38aeaac552c05..ea5afe251b87ba05c952a859efe392bc9937101f 100644 (file)
 /* The size of `void *', as computed by sizeof. */
 #undef SIZEOF_VOID_P
 
-/* Define if the compiler is configured for setjmp/longjmp exceptions. */
-#undef SJLJ_EXCEPTIONS
-
 /* Define if if the synchronization code should try to avoid pthread_self
    calls by caching thread IDs in a hashtable. */
 #undef SLOW_PTHREAD_SELF
index 6aea73468f52dc7ab3e3980e35e9f97ae8a79315..629acfb1fd75c640555acc435d56001818be8359 100644 (file)
@@ -11,7 +11,7 @@ details.  */
 #ifndef JAVA_SIGNAL_H
 #define JAVA_SIGNAL_H 1
 
-#ifdef SJLJ_EXCEPTIONS
+#ifdef __USING_SJLJ_EXCEPTIONS__
 
 #define HANDLE_SEGV 1
 #define HANDLE_FPE 1
@@ -37,7 +37,7 @@ while (0)
 
 #define MAKE_THROW_FRAME(_exception)  do {} while (0)
 
-#else /* SJLJ_EXCEPTIONS */
+#else /* __USING_SJLJ_EXCEPTIONS__ */
 
 #undef HANDLE_SEGV
 #undef HANDLE_FPE
@@ -45,7 +45,7 @@ while (0)
 #define INIT_SEGV   do {} while (0)
 #define INIT_FPE   do {} while (0)
 
-#endif /* SJLJ_EXCEPTIONS */
+#endif /* __USING_SJLJ_EXCEPTIONS__ */
 
 #endif /* JAVA_SIGNAL_H */
   
index d8d1f38ae6c8b2be22a2258727f51dfb202881a4..0fc91c42d8c26d09994d6aa8f5544d82b46e6b00 100644 (file)
@@ -325,7 +325,7 @@ _Jv_StackTrace::GetStackTraceElements (_Jv_StackTrace *trace,
 {
   ArrayList *list = new ArrayList ();
 
-#if defined (SJLJ_EXCEPTIONS) && ! defined (WIN32)
+#if defined (__USING_SJLJ_EXCEPTIONS__) && ! defined (WIN32)
   // We can't use the nCodeMap without unwinder support. Instead,
   // fake the method name by giving the IP in hex - better than nothing.  
   jstring hex = JvNewStringUTF ("0x");
@@ -344,7 +344,7 @@ _Jv_StackTrace::GetStackTraceElements (_Jv_StackTrace *trace,
       list->add (element);
     }
 
-#else /* SJLJ_EXCEPTIONS && !WIN32 */
+#else /* __USING_SJLJ_EXCEPTIONS__ && !WIN32 */
 
   //JvSynchronized (ncodeMap);
   UpdateNCodeMap ();
@@ -412,7 +412,7 @@ _Jv_StackTrace::GetStackTraceElements (_Jv_StackTrace *trace,
     }
   
   finder->close();
-#endif /* SJLJ_EXCEPTIONS && !WIN32 */
+#endif /* __USING_SJLJ_EXCEPTIONS__ && !WIN32 */
 
   JArray<Object *> *array = JvNewObjectArray (list->size (), 
     &StackTraceElement::class$, NULL);
index 1bad2e1492f9c5542b219b1d9daa5ce9b8e2c9a4..cfdf07bc36655c04bef6b82b599dd5deeb1c7ab5 100644 (file)
@@ -36,7 +36,7 @@ struct _Unwind_Context
   _Jv_uintptr_t ret_addr;
 };
 
-#ifdef SJLJ_EXCEPTIONS
+#ifdef __USING_SJLJ_EXCEPTIONS__
 
 #undef _Unwind_GetIPInfo
 #define _Unwind_GetIPInfo(ctx,ip_before_insn) \
@@ -50,7 +50,7 @@ struct _Unwind_Context
 #define _Unwind_Backtrace(trace_fn,state_ptr) \
   (fallback_backtrace (trace_fn, state_ptr))
 
-#endif /* SJLJ_EXCEPTIONS */
+#endif /* __USING_SJLJ_EXCEPTIONS__ */
 
 /* Unwind through the call stack calling TRACE_FN with STATE for each stack
    frame.  Returns the reason why the unwinding was stopped.  */
index 9a9fd3d3b15ee0e7780e7aa25694ab973d06cf9b..f176fd0fc45315143d2c6d13e18faa44bd20d20c 100644 (file)
@@ -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.
index 20d1fcaf32990f55a0c403958fd223f6c7bfce61..0f3dbf2264bf1b9a300bbf2d6259266cd8301c71 100644 (file)
@@ -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
index 2f71735f2552ed013cab1bd85e5709fa1d95f1ad..55fcc33dbe2dddd7fc768ccb43859fbb2b31c4fa 100755 (executable)
@@ -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; }
index 2d88519f6447032d2202f1c9f898529de8359d9a..884194abe19f9f9f83f807ea190a2bf5d47b49ff 100644 (file)
@@ -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
 
 # ------
index d6eb5dbe2a2c1fd8e68c1ea715838ede82a6fd74..1cc837bbdb46e00607413670471749b227a117b7 100644 (file)
@@ -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);
index b9a0ad7f8dc726861d53000a9f79c600a0cc1336..05073316b259276b21cd4f468493435f1baf6c6c 100644 (file)
@@ -1,3 +1,19 @@
+2015-05-13  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * 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.
+
 2015-05-13  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)): Check
index 6f67774bd499ca39863e02970c2f11518b85b272..46e303c0b13a87581536c7b4882577065d894bf0 100644 (file)
@@ -3128,79 +3128,6 @@ EOF
 ])
 
 
-dnl
-dnl Check for exception handling support.  If an explicit enable/disable
-dnl sjlj exceptions is given, we don't have to detect.  Otherwise the
-dnl target may or may not support call frame exceptions.
-dnl
-dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
-dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
-dnl Neither one forces an attempt at detection.
-dnl
-dnl Defines:
-dnl  _GLIBCXX_SJLJ_EXCEPTIONS if the compiler is configured for it
-dnl
-AC_DEFUN([GLIBCXX_ENABLE_SJLJ_EXCEPTIONS], [
-  AC_MSG_CHECKING([for exception model to use])
-  AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  GLIBCXX_ENABLE(sjlj-exceptions,auto,,
-    [force use of builtin_setjmp for exceptions],
-    [permit yes|no|auto])
-
-  if test $enable_sjlj_exceptions = auto; then
-    # Botheration.  Now we've got to detect the exception model.  Link tests
-    # against libgcc.a are problematic since we've not been given proper -L
-    # bits for single-tree newlib and libgloss.
-    #
-    # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
-    cat > conftest.$ac_ext << EOF
-[#]line __oline__ "configure"
-struct S { ~S(); };
-void bar();
-void foo()
-{
-  S s;
-  bar();
-}
-EOF
-    old_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS=-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_SjLj_Register 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
-      elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
-       enable_sjlj_exceptions=no
-      fi
-    fi
-    CXXFLAGS="$old_CXXFLAGS"
-    rm -f conftest*
-  fi
-
-  # This is a tad weird, for hysterical raisins.  We have to map
-  # enable/disable to two different models.
-  case $enable_sjlj_exceptions in
-    yes)
-      AC_DEFINE(_GLIBCXX_SJLJ_EXCEPTIONS, 1,
-       [Define if the compiler is configured for setjmp/longjmp exceptions.])
-      ac_exception_model_name=sjlj
-      ;;
-    no)
-      ac_exception_model_name="call frame"
-      ;;
-    *)
-      AC_MSG_ERROR([unable to detect exception model])
-      ;;
-  esac
- AC_LANG_RESTORE
- AC_MSG_RESULT($ac_exception_model_name)
-])
-
-
 dnl
 dnl Allow visibility attributes to be used on namespaces, objects, etc.
 dnl
index 88d56b5ad59bbf28c355ee984a4d6d1f096df3e5..945d44ecad41a5a6cc870fddc2acf6c55405aba6 100644 (file)
 /* Define if size_t is unsigned int. */
 #undef _GLIBCXX_SIZE_T_IS_UINT
 
-/* Define if the compiler is configured for setjmp/longjmp exceptions. */
-#undef _GLIBCXX_SJLJ_EXCEPTIONS
-
 /* Define to the value of the EOF integer constant. */
 #undef _GLIBCXX_STDIO_EOF
 
index 35508d3bb767bc56ab84d5819cb196772a12d640..c206bcf9a45409735aad408d8112ffd8d3f8315c 100755 (executable)
@@ -862,7 +862,6 @@ with_gnu_ld
 enable_libtool_lock
 enable_hosted_libstdcxx
 enable_libstdcxx_verbose
-enable_sjlj_exceptions
 enable_libstdcxx_pch
 enable_cstdio
 enable_clocale
@@ -1542,9 +1541,6 @@ Optional Features:
                           only build freestanding C++ runtime support
   --disable-libstdcxx-verbose
                           disable termination messages to standard error
-  --enable-sjlj-exceptions
-                          force use of builtin_setjmp for exceptions
-                          [default=auto]
   --enable-libstdcxx-pch  build pre-compiled libstdc++ headers
                           [default=$is_hosted]
   --enable-cstdio[=PACKAGE]
@@ -11655,7 +11651,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11658 "configure"
+#line 11654 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11761,7 +11757,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11764 "configure"
+#line 11760 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15151,92 +15147,6 @@ _ACEOF
 
 # Enable compiler support that doesn't require linking.
 
-  { $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=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-   # Check whether --enable-sjlj-exceptions was given.
-if test "${enable_sjlj_exceptions+set}" = set; then :
-  enableval=$enable_sjlj_exceptions;
-      case "$enableval" in
-       yes|no|auto) ;;
-       *) as_fn_error "Unknown argument to enable/disable sjlj-exceptions" "$LINENO" 5 ;;
-                       esac
-
-else
-  enable_sjlj_exceptions=auto
-fi
-
-
-
-  if test $enable_sjlj_exceptions = auto; then
-    # Botheration.  Now we've got to detect the exception model.  Link tests
-    # against libgcc.a are problematic since we've not been given proper -L
-    # bits for single-tree newlib and libgloss.
-    #
-    # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
-    cat > conftest.$ac_ext << EOF
-#line 15184 "configure"
-struct S { ~S(); };
-void bar();
-void foo()
-{
-  S s;
-  bar();
-}
-EOF
-    old_CXXFLAGS="$CXXFLAGS"
-    CXXFLAGS=-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_SjLj_Register 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
-      elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
-       enable_sjlj_exceptions=no
-      fi
-    fi
-    CXXFLAGS="$old_CXXFLAGS"
-    rm -f conftest*
-  fi
-
-  # This is a tad weird, for hysterical raisins.  We have to map
-  # enable/disable to two different models.
-  case $enable_sjlj_exceptions in
-    yes)
-
-$as_echo "#define _GLIBCXX_SJLJ_EXCEPTIONS 1" >>confdefs.h
-
-      ac_exception_model_name=sjlj
-      ;;
-    no)
-      ac_exception_model_name="call frame"
-      ;;
-    *)
-      as_fn_error "unable to detect exception model" "$LINENO" 5
-      ;;
-  esac
- 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; }
-
-
    # Check whether --enable-libstdcxx-pch was given.
 if test "${enable_libstdcxx_pch+set}" = set; then :
   enableval=$enable_libstdcxx_pch;
@@ -15533,7 +15443,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15536 "configure"
+#line 15446 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15568,7 +15478,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15571 "configure"
+#line 15481 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15603,7 +15513,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15606 "configure"
+#line 15516 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15639,7 +15549,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15642 "configure"
+#line 15552 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15718,7 +15628,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15721 "configure"
+#line 15631 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -15760,7 +15670,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15763 "configure"
+#line 15673 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -15794,7 +15704,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15797 "configure"
+#line 15707 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
index 311baa5a4abc1d746558bf5bb8d6866b273722ca..7eac8a1a0872eadc0e241f6570106018eb9c91cb 100644 (file)
@@ -147,7 +147,6 @@ GLIBCXX_ENABLE_HOSTED
 GLIBCXX_ENABLE_VERBOSE
 
 # Enable compiler support that doesn't require linking.
-GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
 GLIBCXX_ENABLE_PCH($is_hosted)
 GLIBCXX_ENABLE_THREADS
 GLIBCXX_ENABLE_ATOMIC_BUILTINS
index cee81686db9c5282e0e886a5814eba82dccdc144..e2eebe65c41c001501cbe283c7799ec1ce416bab 100644 (file)
@@ -162,7 +162,6 @@ in the build directory starts the build process. The <code class="literal">all</
     GLIBCXX_ENABLE_DEBUG_FLAGS
     GLIBCXX_ENABLE_LONG_LONG
     GLIBCXX_ENABLE_PCH
-    GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
     GLIBCXX_ENABLE_SYMVERS
     GLIBCXX_ENABLE_THREADS
 </pre><p>
index 96f40a62ed097e94cb715d316ff7d368e2c72275..5ec0cf2acac08e3899dde0e1a6d7d9bb790c3b95 100644 (file)
        libstdc++ built many different ways:  "-msoft-float"
        and not, etc.  A different libstdc++ will be built for each of
        the different multilib versions.  This option is on by default.
-     </p></dd><dt><span class="term"><code class="code">--enable-sjlj-exceptions</code></span></dt><dd><p>Forces old, set-jump/long-jump exception handling model.  If
-       at all possible, the new, frame unwinding exception handling routines
-       should be used instead, as they significantly reduce both
-       runtime memory usage and executable size. This option can
-       change the library ABI.
      </p></dd><dt><span class="term"><code class="code">--enable-version-specific-runtime-libs</code></span></dt><dd><p>Specify that run-time libraries should be installed in the
        compiler-specific subdirectory (i.e.,
        <code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
index afcc3736d79dee05fc177e2187252e532d53408c..1b789d32028d6d7bce734fde9014a2ecc4be4119 100644 (file)
@@ -232,7 +232,6 @@ in the build directory starts the build process. The <literal>all</literal> targ
     GLIBCXX_ENABLE_DEBUG_FLAGS
     GLIBCXX_ENABLE_LONG_LONG
     GLIBCXX_ENABLE_PCH
-    GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
     GLIBCXX_ENABLE_SYMVERS
     GLIBCXX_ENABLE_THREADS
 </programlisting>
index 56d071ec46917936520365c5277b4feb67f7f0ba..9ba9c1a7641047b2eecccc2270f384d4d825f652 100644 (file)
      </para>
  </listitem></varlistentry>
 
- <varlistentry><term><code>--enable-sjlj-exceptions</code></term>
- <listitem><para>Forces old, set-jump/long-jump exception handling model.  If
-       at all possible, the new, frame unwinding exception handling routines
-       should be used instead, as they significantly reduce both
-       runtime memory usage and executable size. This option can
-       change the library ABI.
-     </para>
- </listitem></varlistentry>
-
  <varlistentry><term><code>--enable-version-specific-runtime-libs</code></term>
  <listitem><para>Specify that run-time libraries should be installed in the
        compiler-specific subdirectory (i.e.,
index 74bc884741d3c24e13447d4a10bc2545567867c0..f35d51e5bb14486b70d5366b0ba2b6f477241377 100644 (file)
@@ -327,16 +327,16 @@ namespace __cxxabiv1
 
 // Using a different personality function name causes link failures
 // when trying to mix code using different exception handling models.
-#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
+#ifdef __USING_SJLJ_EXCEPTIONS__
 #define PERSONALITY_FUNCTION   __gxx_personality_sj0
 #define __builtin_eh_return_data_regno(x) x
-#elif defined(__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
+#elif defined(__SEH__)
 #define PERSONALITY_FUNCTION   __gxx_personality_imp
 #else
 #define PERSONALITY_FUNCTION   __gxx_personality_v0
 #endif
 
-#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
 static
 #else
 extern "C"
@@ -455,7 +455,7 @@ PERSONALITY_FUNCTION (int version,
   action_record = 0;
   handler_switch_value = 0;
 
-#ifdef _GLIBCXX_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
@@ -508,7 +508,7 @@ PERSONALITY_FUNCTION (int version,
          goto found_something;
        }
     }
-#endif // _GLIBCXX_SJLJ_EXCEPTIONS
+#endif // __USING_SJLJ_EXCEPTIONS__
 
   // If ip is not present in the table, call terminate.  This is for
   // a destructor inside a cleanup, or a library routine the compiler
@@ -789,7 +789,7 @@ __cxa_call_unexpected (void *exc_obj_in)
 }
 #endif
 
-#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
 extern "C"
 EXCEPTION_DISPOSITION
 __gxx_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
index dae9246d02ce92233c8ab2e140be6cb89f93e085..3872767873d6e5ec71302d1aaab16e820c1f3603 100644 (file)
@@ -248,7 +248,7 @@ std::rethrow_exception(std::exception_ptr ep)
   __cxa_eh_globals *globals = __cxa_get_globals ();
   globals->uncaughtExceptions += 1;
 
-#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
+#ifdef __USING_SJLJ_EXCEPTIONS__
   _Unwind_SjLj_RaiseException (&dep->unwindHeader);
 #else
   _Unwind_RaiseException (&dep->unwindHeader);
index d3fa70d117bbdbc2fcd1fb80770f35819b3fc60f..4c953e0cddf8276cae7fda799431e865868b8f27 100644 (file)
@@ -76,7 +76,7 @@ __cxxabiv1::__cxa_throw (void *obj, std::type_info *tinfo,
   __GXX_INIT_PRIMARY_EXCEPTION_CLASS(header->exc.unwindHeader.exception_class);
   header->exc.unwindHeader.exception_cleanup = __gxx_exception_cleanup;
 
-#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
+#ifdef __USING_SJLJ_EXCEPTIONS__
   _Unwind_SjLj_RaiseException (&header->exc.unwindHeader);
 #else
   _Unwind_RaiseException (&header->exc.unwindHeader);
@@ -109,7 +109,7 @@ __cxxabiv1::__cxa_rethrow ()
                  header->exceptionType);
        }
 
-#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
+#ifdef __USING_SJLJ_EXCEPTIONS__
       _Unwind_SjLj_Resume_or_Rethrow (&header->unwindHeader);
 #else
 #if defined(_LIBUNWIND_STD_ABI)
This page took 0.157411 seconds and 5 git commands to generate.