From f406e07ef5dee51738e05a3546ec5af3dd0974c9 Mon Sep 17 00:00:00 2001 From: sje Date: Mon, 9 Oct 2006 15:55:38 +0000 Subject: PR target/27880 * unwind-c.c (PERSONALITY_FUNCTION): Ifdef use of _Unwind_GetIPInfo. * configure.ac (HAVE_GETIPINFO): Check for _Unwind_GetIPInfo. * configure: Regenerate. * config.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117576 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/configure.ac | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gcc/configure.ac') diff --git a/gcc/configure.ac b/gcc/configure.ac index 5841da9bc87..e502ef5f261 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1229,6 +1229,12 @@ AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj, AC_ARG_WITH(system-libunwind, [ --with-system-libunwind use installed libunwind]) +# config.gcc also contains tests of with_system_libunwind. +if test x$with_system_libunwind = xyes; then + AC_DEFINE(HAVE_GETIPINFO, 1, +[Define to 1 if system unwind library has _Unwind_GetIPInfo.]) +fi + # -------------------------------------------------------- # Build, host, and target specific configuration fragments # -------------------------------------------------------- @@ -1439,6 +1445,20 @@ if test x$enable___cxa_atexit = xyes || \ fi fi +use_getipinfo=yes +if test x$with_system_libunwind = xyes; then + if test x$host = x$target; then + AC_SEARCH_LIBS(_Unwind_GetIPInfo, unwind,, [use_getipinfo=no]) + fi +fi +GCC_TARGET_TEMPLATE(HAVE_GETIPINFO) +if test x$use_getipinfo = xyes; then + AC_DEFINE(HAVE_GETIPINFO, 1, + [Define to 1 if system unwind library has _Unwind_GetIPInfo.]) +else + echo "The system unwind library does not support _Unwind_GetIPInfo." +fi + # Look for a file containing extra machine modes. if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then extra_modes_file='$(srcdir)'/config/${extra_modes} -- cgit v1.2.1