re PR target/26792 (need to use autoconf when using newly-added libgcc functions)

PR target/26792
	* unwind_ipinfo.m4: New.

From-SVN: r115653
This commit is contained in:
Steve Ellcey 2006-07-21 21:07:15 +00:00 committed by Steve Ellcey
parent f325272c07
commit 511464e382
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-07-21 Steve Ellcey <sje@cup.hp.com>
PR target/26792
* unwind_ipinfo.m4: New.
2006-07-21 David Daney <ddaney@avtrex.com>
PR libgcj/28426

22
config/unwind_ipinfo.m4 Normal file
View File

@ -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
])