summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac20
1 files changed, 20 insertions, 0 deletions
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}