summaryrefslogtreecommitdiff
path: root/libbacktrace/configure.ac
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 17:34:59 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 17:34:59 +0000
commita4a5a77adfc9c28d6963e5ae054c997d57cfc7fa (patch)
tree5246f8eb551abdd7c816a0ada36100751a6995ac /libbacktrace/configure.ac
parent247ea43cf83b9b3aeae600dbf9d4b50b197a5576 (diff)
downloadgcc-a4a5a77adfc9c28d6963e5ae054c997d57cfc7fa.tar.gz
PR target/55061
* configure.ac: Check for _Unwind_GetIPInfo function declaration. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192853 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libbacktrace/configure.ac')
-rw-r--r--libbacktrace/configure.ac14
1 files changed, 12 insertions, 2 deletions
diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac
index 6867ecffb89..534f9276cdb 100644
--- a/libbacktrace/configure.ac
+++ b/libbacktrace/configure.ac
@@ -129,8 +129,18 @@ AC_SUBST(WARN_FLAGS)
if test -n "${with_target_subdir}"; then
GCC_CHECK_UNWIND_GETIPINFO
else
- AC_CHECK_FUNC(_Unwind_GetIPInfo, [have_unwind_getipinfo=yes],
- [have_unwind_getipinfo=no])
+ ac_save_CFFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
+ AC_MSG_CHECKING([for _Unwind_GetIPInfo])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "unwind.h"
+ struct _Unwind_Context *context;
+ int ip_before_insn = 0;],
+ [return _Unwind_GetIPInfo (context, &ip_before_insn);])],
+ [have_unwind_getipinfo=yes], [have_unwind_getipinfo=no])
+ CFLAGS="$ac_save_CFLAGS"
+ AC_MSG_RESULT([$have_unwind_getipinfo])
if test "$have_unwind_getipinfo" = "yes"; then
AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
fi