summaryrefslogtreecommitdiff
path: root/config/unwind_ipinfo.m4
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2006-07-21 21:07:15 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2006-07-21 21:07:15 +0000
commit511464e382c21b038f1a139b8c0f67b37ffaad3a (patch)
tree1602a8d20286b5971e9d4eb2519bbf29ab0724e9 /config/unwind_ipinfo.m4
parentf325272c07f30aa938504b3596f7a65292bcfeeb (diff)
downloadgcc-511464e382c21b038f1a139b8c0f67b37ffaad3a.tar.gz
re PR target/26792 (need to use autoconf when using newly-added libgcc functions)
PR target/26792 * unwind_ipinfo.m4: New. From-SVN: r115653
Diffstat (limited to 'config/unwind_ipinfo.m4')
-rw-r--r--config/unwind_ipinfo.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/config/unwind_ipinfo.m4 b/config/unwind_ipinfo.m4
new file mode 100644
index 00000000000..5587d9c3fb0
--- /dev/null
+++ b/config/unwind_ipinfo.m4
@@ -0,0 +1,22 @@
+dnl
+dnl Check whether _Unwind_GetIPInfo is available.
+dnl
+AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_MSG_CHECKING([for _Unwind_GetIPInfo])
+ AC_CACHE_VAL(gcc_cv_getipinfo, [
+ AC_TRY_LINK([extern "C" { extern void _Unwind_GetIPInfo(); }],
+ [_Unwind_GetIPInfo();],
+ [gcc_cv_getipinfo=yes],
+ [gcc_cv_getipinfo=no])
+ ])
+ if test $gcc_cv_getipinfo = yes; then
+ AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
+ fi
+ AC_MSG_RESULT($gcc_cv_getipinfo)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+])