summaryrefslogtreecommitdiff
path: root/libjava/configure.ac
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-13 21:15:31 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-13 21:15:31 +0000
commit177cc56cf225e09e18161e72d2f369be27b22119 (patch)
treedc6a0f80d4e52e052312acffbba59b37f142e9ef /libjava/configure.ac
parentee8d553071a6e314f2b4bab7bfc8a6384cc11bc4 (diff)
downloadgcc-177cc56cf225e09e18161e72d2f369be27b22119.tar.gz
config/
* sjlj.m4: New file. libgcc/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * config.in: Regenerate. * configure: Likewise. * config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions. libjava/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * include/config.h.in: Regenerate. * configure: Likewise. * exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * stacktrace.cc: Likewise. * include/default-signal.h: Likewise. * sysdep/i386/backtrace.h: Likewise. libobjc/ * configure.ac: Remove manual SJLJ check. * config.h.in: Regenerate. * configure: Likewise. * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. libstdc++-v3/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete. * configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * libsupc++/eh_throw.cc: Likewise. * libsupc++/eh_ptr.cc: Likewise. * doc/html/manual/appendix_porting.html: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS * doc/xml/manual/build_hacking.xml: Likewise. * doc/html/manual/configure.html: Remove --enable-sjlj-exceptions. * doc/xml/manual/configure.xml: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/configure.ac')
-rw-r--r--libjava/configure.ac59
1 files changed, 7 insertions, 52 deletions
diff --git a/libjava/configure.ac b/libjava/configure.ac
index 01c436d852d..00bbd360759 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -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