sjlj.m4: New file.

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
This commit is contained in:
Eric Botcazou 2015-05-13 21:15:31 +00:00 committed by Eric Botcazou
parent 7893307bb2
commit 9b92a9f3b6
31 changed files with 140 additions and 531 deletions

View 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> 2015-05-04 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* bitfields.m4: Change int to long long, and use bitfields of * bitfields.m4: Change int to long long, and use bitfields of

12
config/sjlj.m4 Normal file
View File

@ -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])])])

View 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> 2015-05-12 Uros Bizjak <ubizjak@gmail.com>
* libgcov-util.c: Add space between string literal and macro name. * libgcov-util.c: Add space between string literal and macro name.

View File

@ -499,7 +499,7 @@ hppa*64*-*-linux*)
hppa*-*-linux*) hppa*-*-linux*)
tmake_file="$tmake_file pa/t-linux t-slibgcc-libgcc" tmake_file="$tmake_file pa/t-linux t-slibgcc-libgcc"
# Set the libgcc version number # 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" tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
else else
tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver" tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
@ -510,7 +510,7 @@ hppa*-*-linux*)
hppa[12]*-*-hpux10*) hppa[12]*-*-hpux10*)
tmake_file="$tmake_file pa/t-hpux pa/t-hpux10 t-libgcc-pic t-slibgcc" tmake_file="$tmake_file pa/t-hpux pa/t-hpux10 t-libgcc-pic t-slibgcc"
# Set the libgcc version number # 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" tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
else else
tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver" tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
@ -521,7 +521,7 @@ hppa[12]*-*-hpux10*)
hppa*64*-*-hpux11*) hppa*64*-*-hpux11*)
tmake_file="$tmake_file pa/t-hpux pa/t-pa64 pa/t-stublib t-libgcc-pic t-slibgcc" tmake_file="$tmake_file pa/t-hpux pa/t-pa64 pa/t-stublib t-libgcc-pic t-slibgcc"
# Set the libgcc version number # 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" tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
else else
tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver" tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
@ -534,7 +534,7 @@ hppa*64*-*-hpux11*)
hppa[12]*-*-hpux11*) hppa[12]*-*-hpux11*)
tmake_file="$tmake_file pa/t-hpux pa/t-stublib t-libgcc-pic t-slibgcc" tmake_file="$tmake_file pa/t-hpux pa/t-stublib t-libgcc-pic t-slibgcc"
# Set the libgcc version number # 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" tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
else else
tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver" 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" extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
fi fi
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h # 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" tmake_eh_file="i386/t-sjlj-eh"
else else
tmake_eh_file="i386/t-dw2-eh" 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" extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
fi fi
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h # 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" tmake_eh_file="i386/t-sjlj-eh"
else else
tmake_eh_file="i386/t-seh-eh" tmake_eh_file="i386/t-seh-eh"
@ -682,7 +682,7 @@ i[34567]86-*-mingw*)
;; ;;
esac esac
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h # 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" tmake_eh_file="i386/t-sjlj-eh"
else else
tmake_eh_file="i386/t-dw2-eh" tmake_eh_file="i386/t-dw2-eh"
@ -706,7 +706,7 @@ x86_64-*-mingw*)
;; ;;
esac esac
# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h # 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" tmake_eh_file="i386/t-sjlj-eh"
else else
tmake_eh_file="i386/t-seh-eh" 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 # with ELF format using glibc 2
# aka the GNU/Linux C library 6. # aka the GNU/Linux C library 6.
tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux" 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. # 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" tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
fi fi
md_unwind_header=m68k/linux-unwind.h md_unwind_header=m68k/linux-unwind.h

View File

@ -39,9 +39,6 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #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. */ /* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT

84
libgcc/configure vendored
View File

@ -670,7 +670,6 @@ enable_maintainer_mode
with_build_libsubdir with_build_libsubdir
enable_decimal_float enable_decimal_float
with_system_libunwind with_system_libunwind
enable_sjlj_exceptions
enable_explicit_exception_frame_registration enable_explicit_exception_frame_registration
with_glibc_version with_glibc_version
enable_tls enable_tls
@ -1308,8 +1307,6 @@ Optional Features:
enable decimal float extension to C. Selecting 'bid' enable decimal float extension to C. Selecting 'bid'
or 'dpd' choses which decimal floating point format or 'dpd' choses which decimal floating point format
to use to use
--enable-sjlj-exceptions
force use of builtin_setjmp for exceptions
--enable-explicit-exception-frame-registration --enable-explicit-exception-frame-registration
register exception tables explicitly at module register exception tables explicitly at module
start, for use e.g. for compatibility with start, for use e.g. for compatibility with
@ -4539,80 +4536,43 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
fi fi
# The sjlj test is almost duplicated here and in libgo/configure.ac (for C), # Check if the compiler is configured for setjmp/longjmp exceptions.
# libstdc++-v3/acinclude.m4 and libjava/configure.ac (for C++), and { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is configured for setjmp/longjmp exceptions" >&5
# libobjc/configure.ac (for Objective-C). $as_echo_n "checking whether the compiler is configured for setjmp/longjmp exceptions... " >&6; }
# FIXME: This should be centralized in config/sjlj.m4. if test "${ac_cv_sjlj_exceptions+set}" = set; then :
# 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 :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#ifdef __USING_SJLJ_EXCEPTIONS__
void bar (); this will fail
void clean (int *); #endif
void foo () int
main ()
{ {
int i __attribute__ ((cleanup (clean))); int i;
bar(); ;
return 0;
} }
_ACEOF _ACEOF
CFLAGS_hold=$CFLAGS if ac_fn_c_try_compile "$LINENO"; then :
CFLAGS="--save-temps -fexceptions" ac_cv_sjlj_exceptions=no
libgcc_cv_lib_sjlj_exceptions=unknown else
if ac_fn_c_try_compile; then : ac_cv_sjlj_exceptions=yes
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 fi
CFLAGS=$CFLAGS_hold rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
rm -f conftest*
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_lib_sjlj_exceptions" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sjlj_exceptions" >&5
$as_echo "$libgcc_cv_lib_sjlj_exceptions" >&6; } $as_echo "$ac_cv_sjlj_exceptions" >&6; }
if test "$enable_sjlj_exceptions" = "auto"; then
enable_sjlj_exceptions=$libgcc_cv_lib_sjlj_exceptions
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
# Check whether --enable-explicit-exception-frame-registration was given. # Check whether --enable-explicit-exception-frame-registration was given.
if test "${enable_explicit_exception_frame_registration+set}" = set; then : if test "${enable_explicit_exception_frame_registration+set}" = set; then :
enableval=$enable_explicit_exception_frame_registration; enableval=$enable_explicit_exception_frame_registration;
force_explicit_eh_registry= force_explicit_eh_registry=
if test "$enable_explicit_exception_frame_registration" = yes; then if test "$enable_explicit_exception_frame_registration" = yes; then
if test "$enable_sjlj_exceptions" = yes; then if test $ac_cv_sjlj_exceptions = yes; then
as_fn_error "Can't enable both of --enable-sjlj-exceptions as_fn_error "Can't --enable-explicit-exception-frame-registration
and --enable-explicit-exception-frame-registration" "$LINENO" 5 with setjmp/longjmp exceptions" "$LINENO" 5
fi fi
force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS
fi fi

View File

@ -10,6 +10,7 @@ sinclude(../config/picflag.m4)
sinclude(../config/dfp.m4) sinclude(../config/dfp.m4)
sinclude(../config/unwind_ipinfo.m4) sinclude(../config/unwind_ipinfo.m4)
sinclude(../config/gthr.m4) sinclude(../config/gthr.m4)
sinclude(../config/sjlj.m4)
AC_PREREQ(2.64) AC_PREREQ(2.64)
AC_INIT([GNU C Runtime Library], 1.0,,[libgcc]) 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. # config.gcc also contains tests of with_system_libunwind.
GCC_CHECK_UNWIND_GETIPINFO GCC_CHECK_UNWIND_GETIPINFO
# The sjlj test is almost duplicated here and in libgo/configure.ac (for C), # Check if the compiler is configured for setjmp/longjmp exceptions.
# libstdc++-v3/acinclude.m4 and libjava/configure.ac (for C++), and GCC_CHECK_SJLJ_EXCEPTIONS
# 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
AC_ARG_ENABLE([explicit-exception-frame-registration], AC_ARG_ENABLE([explicit-exception-frame-registration],
[AC_HELP_STRING([--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= force_explicit_eh_registry=
if test "$enable_explicit_exception_frame_registration" = yes; then if test "$enable_explicit_exception_frame_registration" = yes; then
if test "$enable_sjlj_exceptions" = yes; then if test $ac_cv_sjlj_exceptions = yes; then
AC_MSG_ERROR([Can't enable both of --enable-sjlj-exceptions AC_MSG_ERROR([Can't --enable-explicit-exception-frame-registration
and --enable-explicit-exception-frame-registration]) with setjmp/longjmp exceptions])
fi fi
force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS
fi fi

View 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> 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
* Makefile.in: Regenerated with automake-1.11.6. * Makefile.in: Regenerated with automake-1.11.6.

View File

@ -1,4 +1,7 @@
dnl # Process this with autoconf to create configure dnl # Process this with autoconf to create configure
sinclude(../config/sjlj.m4)
AC_PREREQ(2.64) AC_PREREQ(2.64)
# Still use "libjava" here to placate dejagnu. # Still use "libjava" here to placate dejagnu.
AC_INIT([libjava], [version-unused],, [libjava]) AC_INIT([libjava], [version-unused],, [libjava])
@ -699,58 +702,10 @@ INTERPRETER="$libgcj_interpreter"
AC_SUBST(INTERPRETER) AC_SUBST(INTERPRETER)
AM_CONDITIONAL(INTERPRETER, test "$libgcj_interpreter" = yes) AM_CONDITIONAL(INTERPRETER, test "$libgcj_interpreter" = yes)
AC_MSG_CHECKING([for exception model to use]) # If we are not using SJLJ exceptions, and this host does not have support
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
# for unwinding from a signal handler, enable checked dereferences and divides. # 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 CHECKREFSPEC=-fcheck-references
DIVIDESPEC=-fuse-divide-subroutine DIVIDESPEC=-fuse-divide-subroutine
EXCEPTIONSPEC= EXCEPTIONSPEC=
@ -1761,7 +1716,7 @@ case "${host}" in
esac esac
# If we're using sjlj exceptions, forget what we just learned. # 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=include/default-signal.h
SIGNAL_HANDLER_AUX= SIGNAL_HANDLER_AUX=
fi fi

View File

@ -112,7 +112,7 @@ _Jv_Throw (jthrowable value)
/* We're happy with setjmp/longjmp exceptions or region-based /* We're happy with setjmp/longjmp exceptions or region-based
exception handlers: entry points are provided here for both. */ exception handlers: entry points are provided here for both. */
#ifdef SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException (&xh->unwindHeader); _Unwind_SjLj_RaiseException (&xh->unwindHeader);
#else #else
_Unwind_RaiseException (&xh->unwindHeader); _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 // Using a different personality function name causes link failures
// when trying to mix code using different exception handling models. // when trying to mix code using different exception handling models.
#ifdef SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
#define PERSONALITY_FUNCTION __gcj_personality_sj0 #define PERSONALITY_FUNCTION __gcj_personality_sj0
#define __builtin_eh_return_data_regno(x) x #define __builtin_eh_return_data_regno(x) x
#elif defined (__SEH__) #elif defined (__SEH__)
@ -331,7 +331,7 @@ PERSONALITY_FUNCTION (int version,
action_record = 0; action_record = 0;
handler_switch_value = 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 // The given "IP" is an index into the call-site table, with two
// exceptions -- -1 means no-action, and 0 means terminate. But // exceptions -- -1 means no-action, and 0 means terminate. But
// since we're using uleb128 values, we've not got random access // since we're using uleb128 values, we've not got random access
@ -380,7 +380,7 @@ PERSONALITY_FUNCTION (int version,
goto found_something; goto found_something;
} }
} }
#endif // SJLJ_EXCEPTIONS #endif // __USING_SJLJ_EXCEPTIONS__
// If ip is not present in the table, C++ would call terminate. // If ip is not present in the table, C++ would call terminate.
// ??? It is perhaps better to tweek the LSDA so that no-action // ??? It is perhaps better to tweek the LSDA so that no-action

View File

@ -423,9 +423,6 @@
/* The size of `void *', as computed by sizeof. */ /* The size of `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P #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 /* Define if if the synchronization code should try to avoid pthread_self
calls by caching thread IDs in a hashtable. */ calls by caching thread IDs in a hashtable. */
#undef SLOW_PTHREAD_SELF #undef SLOW_PTHREAD_SELF

View File

@ -11,7 +11,7 @@ details. */
#ifndef JAVA_SIGNAL_H #ifndef JAVA_SIGNAL_H
#define JAVA_SIGNAL_H 1 #define JAVA_SIGNAL_H 1
#ifdef SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
#define HANDLE_SEGV 1 #define HANDLE_SEGV 1
#define HANDLE_FPE 1 #define HANDLE_FPE 1
@ -37,7 +37,7 @@ while (0)
#define MAKE_THROW_FRAME(_exception) do {} while (0) #define MAKE_THROW_FRAME(_exception) do {} while (0)
#else /* SJLJ_EXCEPTIONS */ #else /* __USING_SJLJ_EXCEPTIONS__ */
#undef HANDLE_SEGV #undef HANDLE_SEGV
#undef HANDLE_FPE #undef HANDLE_FPE
@ -45,7 +45,7 @@ while (0)
#define INIT_SEGV do {} while (0) #define INIT_SEGV do {} while (0)
#define INIT_FPE do {} while (0) #define INIT_FPE do {} while (0)
#endif /* SJLJ_EXCEPTIONS */ #endif /* __USING_SJLJ_EXCEPTIONS__ */
#endif /* JAVA_SIGNAL_H */ #endif /* JAVA_SIGNAL_H */

View File

@ -325,7 +325,7 @@ _Jv_StackTrace::GetStackTraceElements (_Jv_StackTrace *trace,
{ {
ArrayList *list = new ArrayList (); 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, // We can't use the nCodeMap without unwinder support. Instead,
// fake the method name by giving the IP in hex - better than nothing. // fake the method name by giving the IP in hex - better than nothing.
jstring hex = JvNewStringUTF ("0x"); jstring hex = JvNewStringUTF ("0x");
@ -344,7 +344,7 @@ _Jv_StackTrace::GetStackTraceElements (_Jv_StackTrace *trace,
list->add (element); list->add (element);
} }
#else /* SJLJ_EXCEPTIONS && !WIN32 */ #else /* __USING_SJLJ_EXCEPTIONS__ && !WIN32 */
//JvSynchronized (ncodeMap); //JvSynchronized (ncodeMap);
UpdateNCodeMap (); UpdateNCodeMap ();
@ -412,7 +412,7 @@ _Jv_StackTrace::GetStackTraceElements (_Jv_StackTrace *trace,
} }
finder->close(); finder->close();
#endif /* SJLJ_EXCEPTIONS && !WIN32 */ #endif /* __USING_SJLJ_EXCEPTIONS__ && !WIN32 */
JArray<Object *> *array = JvNewObjectArray (list->size (), JArray<Object *> *array = JvNewObjectArray (list->size (),
&StackTraceElement::class$, NULL); &StackTraceElement::class$, NULL);

View File

@ -36,7 +36,7 @@ struct _Unwind_Context
_Jv_uintptr_t ret_addr; _Jv_uintptr_t ret_addr;
}; };
#ifdef SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
#undef _Unwind_GetIPInfo #undef _Unwind_GetIPInfo
#define _Unwind_GetIPInfo(ctx,ip_before_insn) \ #define _Unwind_GetIPInfo(ctx,ip_before_insn) \
@ -50,7 +50,7 @@ struct _Unwind_Context
#define _Unwind_Backtrace(trace_fn,state_ptr) \ #define _Unwind_Backtrace(trace_fn,state_ptr) \
(fallback_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 /* Unwind through the call stack calling TRACE_FN with STATE for each stack
frame. Returns the reason why the unwinding was stopped. */ frame. Returns the reason why the unwinding was stopped. */

View 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> 2015-05-13 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
* aclocal.m4: Regenerated with automake-1.11.6. * aclocal.m4: Regenerated with automake-1.11.6.

View File

@ -67,8 +67,5 @@
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #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. */ /* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS

72
libobjc/configure vendored
View File

@ -721,7 +721,6 @@ enable_fast_install
with_gnu_ld with_gnu_ld
enable_libtool_lock enable_libtool_lock
enable_tls enable_tls
enable_sjlj_exceptions
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
@ -1355,8 +1354,6 @@ Optional Features:
optimize for fast installation [default=yes] optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds) --disable-libtool-lock avoid locking (might break parallel builds)
--enable-tls Use thread-local storage [default=yes] --enable-tls Use thread-local storage [default=yes]
--enable-sjlj-exceptions
force use of builtin_setjmp for exceptions
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -10601,7 +10598,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10604 "configure" #line 10601 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -10707,7 +10704,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10710 "configure" #line 10707 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11465,71 +11462,6 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h
fi 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 "$as_me:${as_lineno-$LINENO}: checking if the type of bitfields matters" >&5
$as_echo_n "checking if the type of bitfields matters... " >&6; } $as_echo_n "checking if the type of bitfields matters... " >&6; }

View File

@ -212,60 +212,6 @@ AC_CHECK_HEADERS(sched.h)
# Check if we have thread-local storage # Check if we have thread-local storage
GCC_CHECK_TLS 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 gt_BITFIELD_TYPE_MATTERS
# ------ # ------

View 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 /* Using a different personality function name causes link failures
when trying to mix code using different exception handling when trying to mix code using different exception handling
models. */ models. */
#ifdef SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
#define PERSONALITY_FUNCTION __gnu_objc_personality_sj0 #define PERSONALITY_FUNCTION __gnu_objc_personality_sj0
#define __builtin_eh_return_data_regno(x) x #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 #define PERSONALITY_FUNCTION __gnu_objc_personality_imp
#else #else
#define PERSONALITY_FUNCTION __gnu_objc_personality_v0 #define PERSONALITY_FUNCTION __gnu_objc_personality_v0
@ -329,7 +329,7 @@ PERSONALITY_FUNCTION (int version,
action_record = 0; action_record = 0;
handler_switch_value = 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 /* The given "IP" is an index into the call-site table, with two
exceptions -- -1 means no-action, and 0 means terminate. But exceptions -- -1 means no-action, and 0 means terminate. But
since we're using uleb128 values, we've not got random access to since we're using uleb128 values, we've not got random access to
@ -380,7 +380,7 @@ PERSONALITY_FUNCTION (int version,
goto found_something; goto found_something;
} }
} }
#endif /* SJLJ_EXCEPTIONS */ #endif /* __USING_SJLJ_EXCEPTIONS__ */
/* If ip is not present in the table, C++ would call terminate. */ /* 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 /* ??? 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->base.exception_cleanup = __objc_exception_cleanup;
header->value = exception; header->value = exception;
#ifdef SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException (&header->base); _Unwind_SjLj_RaiseException (&header->base);
#else #else
_Unwind_RaiseException (&header->base); _Unwind_RaiseException (&header->base);

View 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> 2015-05-13 Jonathan Wakely <jwakely@redhat.com>
* include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)): Check * include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)): Check

View 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
dnl Allow visibility attributes to be used on namespaces, objects, etc. dnl Allow visibility attributes to be used on namespaces, objects, etc.
dnl dnl

View File

@ -768,9 +768,6 @@
/* Define if size_t is unsigned int. */ /* Define if size_t is unsigned int. */
#undef _GLIBCXX_SIZE_T_IS_UINT #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. */ /* Define to the value of the EOF integer constant. */
#undef _GLIBCXX_STDIO_EOF #undef _GLIBCXX_STDIO_EOF

108
libstdc++-v3/configure vendored
View File

@ -862,7 +862,6 @@ with_gnu_ld
enable_libtool_lock enable_libtool_lock
enable_hosted_libstdcxx enable_hosted_libstdcxx
enable_libstdcxx_verbose enable_libstdcxx_verbose
enable_sjlj_exceptions
enable_libstdcxx_pch enable_libstdcxx_pch
enable_cstdio enable_cstdio
enable_clocale enable_clocale
@ -1542,9 +1541,6 @@ Optional Features:
only build freestanding C++ runtime support only build freestanding C++ runtime support
--disable-libstdcxx-verbose --disable-libstdcxx-verbose
disable termination messages to standard error 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 --enable-libstdcxx-pch build pre-compiled libstdc++ headers
[default=$is_hosted] [default=$is_hosted]
--enable-cstdio[=PACKAGE] --enable-cstdio[=PACKAGE]
@ -11655,7 +11651,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11658 "configure" #line 11654 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11761,7 +11757,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11764 "configure" #line 11760 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -15151,92 +15147,6 @@ _ACEOF
# Enable compiler support that doesn't require linking. # 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. # Check whether --enable-libstdcxx-pch was given.
if test "${enable_libstdcxx_pch+set}" = set; then : if test "${enable_libstdcxx_pch+set}" = set; then :
enableval=$enable_libstdcxx_pch; enableval=$enable_libstdcxx_pch;
@ -15533,7 +15443,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does. # Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15536 "configure" #line 15446 "configure"
int main() int main()
{ {
typedef bool atomic_type; typedef bool atomic_type;
@ -15568,7 +15478,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15571 "configure" #line 15481 "configure"
int main() int main()
{ {
typedef short atomic_type; typedef short atomic_type;
@ -15603,7 +15513,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15606 "configure" #line 15516 "configure"
int main() int main()
{ {
// NB: _Atomic_word not necessarily int. // NB: _Atomic_word not necessarily int.
@ -15639,7 +15549,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15642 "configure" #line 15552 "configure"
int main() int main()
{ {
typedef long long atomic_type; 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. # unnecessary for this test.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15721 "configure" #line 15631 "configure"
int main() int main()
{ {
_Decimal32 d1; _Decimal32 d1;
@ -15760,7 +15670,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test. # unnecessary for this test.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15763 "configure" #line 15673 "configure"
template<typename T1, typename T2> template<typename T1, typename T2>
struct same struct same
{ typedef T2 type; }; { typedef T2 type; };
@ -15794,7 +15704,7 @@ $as_echo "$enable_int128" >&6; }
rm -f conftest* rm -f conftest*
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 15797 "configure" #line 15707 "configure"
template<typename T1, typename T2> template<typename T1, typename T2>
struct same struct same
{ typedef T2 type; }; { typedef T2 type; };

View File

@ -147,7 +147,6 @@ GLIBCXX_ENABLE_HOSTED
GLIBCXX_ENABLE_VERBOSE GLIBCXX_ENABLE_VERBOSE
# Enable compiler support that doesn't require linking. # Enable compiler support that doesn't require linking.
GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
GLIBCXX_ENABLE_PCH($is_hosted) GLIBCXX_ENABLE_PCH($is_hosted)
GLIBCXX_ENABLE_THREADS GLIBCXX_ENABLE_THREADS
GLIBCXX_ENABLE_ATOMIC_BUILTINS GLIBCXX_ENABLE_ATOMIC_BUILTINS

View File

@ -162,7 +162,6 @@ in the build directory starts the build process. The <code class="literal">all</
GLIBCXX_ENABLE_DEBUG_FLAGS GLIBCXX_ENABLE_DEBUG_FLAGS
GLIBCXX_ENABLE_LONG_LONG GLIBCXX_ENABLE_LONG_LONG
GLIBCXX_ENABLE_PCH GLIBCXX_ENABLE_PCH
GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
GLIBCXX_ENABLE_SYMVERS GLIBCXX_ENABLE_SYMVERS
GLIBCXX_ENABLE_THREADS GLIBCXX_ENABLE_THREADS
</pre><p> </pre><p>

View File

@ -22,11 +22,6 @@
libstdc++ built many different ways: "-msoft-float" libstdc++ built many different ways: "-msoft-float"
and not, etc. A different libstdc++ will be built for each of and not, etc. A different libstdc++ will be built for each of
the different multilib versions. This option is on by default. 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 </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., compiler-specific subdirectory (i.e.,
<code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>) <code class="code">${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)

View File

@ -232,7 +232,6 @@ in the build directory starts the build process. The <literal>all</literal> targ
GLIBCXX_ENABLE_DEBUG_FLAGS GLIBCXX_ENABLE_DEBUG_FLAGS
GLIBCXX_ENABLE_LONG_LONG GLIBCXX_ENABLE_LONG_LONG
GLIBCXX_ENABLE_PCH GLIBCXX_ENABLE_PCH
GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
GLIBCXX_ENABLE_SYMVERS GLIBCXX_ENABLE_SYMVERS
GLIBCXX_ENABLE_THREADS GLIBCXX_ENABLE_THREADS
</programlisting> </programlisting>

View File

@ -45,15 +45,6 @@
</para> </para>
</listitem></varlistentry> </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> <varlistentry><term><code>--enable-version-specific-runtime-libs</code></term>
<listitem><para>Specify that run-time libraries should be installed in the <listitem><para>Specify that run-time libraries should be installed in the
compiler-specific subdirectory (i.e., compiler-specific subdirectory (i.e.,

View File

@ -327,16 +327,16 @@ namespace __cxxabiv1
// Using a different personality function name causes link failures // Using a different personality function name causes link failures
// when trying to mix code using different exception handling models. // 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 PERSONALITY_FUNCTION __gxx_personality_sj0
#define __builtin_eh_return_data_regno(x) x #define __builtin_eh_return_data_regno(x) x
#elif defined(__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS) #elif defined(__SEH__)
#define PERSONALITY_FUNCTION __gxx_personality_imp #define PERSONALITY_FUNCTION __gxx_personality_imp
#else #else
#define PERSONALITY_FUNCTION __gxx_personality_v0 #define PERSONALITY_FUNCTION __gxx_personality_v0
#endif #endif
#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS) #if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
static static
#else #else
extern "C" extern "C"
@ -455,7 +455,7 @@ PERSONALITY_FUNCTION (int version,
action_record = 0; action_record = 0;
handler_switch_value = 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 // The given "IP" is an index into the call-site table, with two
// exceptions -- -1 means no-action, and 0 means terminate. But // exceptions -- -1 means no-action, and 0 means terminate. But
// since we're using uleb128 values, we've not got random access // since we're using uleb128 values, we've not got random access
@ -508,7 +508,7 @@ PERSONALITY_FUNCTION (int version,
goto found_something; goto found_something;
} }
} }
#endif // _GLIBCXX_SJLJ_EXCEPTIONS #endif // __USING_SJLJ_EXCEPTIONS__
// If ip is not present in the table, call terminate. This is for // If ip is not present in the table, call terminate. This is for
// a destructor inside a cleanup, or a library routine the compiler // a destructor inside a cleanup, or a library routine the compiler
@ -789,7 +789,7 @@ __cxa_call_unexpected (void *exc_obj_in)
} }
#endif #endif
#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS) #if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
extern "C" extern "C"
EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION
__gxx_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame, __gxx_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,

View File

@ -248,7 +248,7 @@ std::rethrow_exception(std::exception_ptr ep)
__cxa_eh_globals *globals = __cxa_get_globals (); __cxa_eh_globals *globals = __cxa_get_globals ();
globals->uncaughtExceptions += 1; globals->uncaughtExceptions += 1;
#ifdef _GLIBCXX_SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException (&dep->unwindHeader); _Unwind_SjLj_RaiseException (&dep->unwindHeader);
#else #else
_Unwind_RaiseException (&dep->unwindHeader); _Unwind_RaiseException (&dep->unwindHeader);

View File

@ -76,7 +76,7 @@ __cxxabiv1::__cxa_throw (void *obj, std::type_info *tinfo,
__GXX_INIT_PRIMARY_EXCEPTION_CLASS(header->exc.unwindHeader.exception_class); __GXX_INIT_PRIMARY_EXCEPTION_CLASS(header->exc.unwindHeader.exception_class);
header->exc.unwindHeader.exception_cleanup = __gxx_exception_cleanup; header->exc.unwindHeader.exception_cleanup = __gxx_exception_cleanup;
#ifdef _GLIBCXX_SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException (&header->exc.unwindHeader); _Unwind_SjLj_RaiseException (&header->exc.unwindHeader);
#else #else
_Unwind_RaiseException (&header->exc.unwindHeader); _Unwind_RaiseException (&header->exc.unwindHeader);
@ -109,7 +109,7 @@ __cxxabiv1::__cxa_rethrow ()
header->exceptionType); header->exceptionType);
} }
#ifdef _GLIBCXX_SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_Resume_or_Rethrow (&header->unwindHeader); _Unwind_SjLj_Resume_or_Rethrow (&header->unwindHeader);
#else #else
#if defined(_LIBUNWIND_STD_ABI) #if defined(_LIBUNWIND_STD_ABI)