aboutsummaryrefslogtreecommitdiff
path: root/libgcc/configure.ac
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-05-13 21:15:31 +0000
committerEric Botcazou <ebotcazou@adacore.com>2015-05-13 21:15:31 +0000
commitd2597403efad295c340161e2ef4ae4af34e2ce7f (patch)
treedc6a0f80d4e52e052312acffbba59b37f142e9ef /libgcc/configure.ac
parent390a3330412f29f3126e46375f713c1390a7e314 (diff)
config/
* sjlj.m4: New file. libgcc/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * config.in: Regenerate. * configure: Likewise. * config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions. libjava/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * include/config.h.in: Regenerate. * configure: Likewise. * exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * stacktrace.cc: Likewise. * include/default-signal.h: Likewise. * sysdep/i386/backtrace.h: Likewise. libobjc/ * configure.ac: Remove manual SJLJ check. * config.h.in: Regenerate. * configure: Likewise. * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. libstdc++-v3/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete. * configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * libsupc++/eh_throw.cc: Likewise. * libsupc++/eh_ptr.cc: Likewise. * doc/html/manual/appendix_porting.html: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS * doc/xml/manual/build_hacking.xml: Likewise. * doc/html/manual/configure.html: Remove --enable-sjlj-exceptions. * doc/xml/manual/configure.xml: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@223181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/configure.ac')
-rw-r--r--libgcc/configure.ac62
1 files changed, 6 insertions, 56 deletions
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 48fd5b9abc1..dfabd808d11 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -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