diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-26 17:34:59 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-26 17:34:59 +0000 |
commit | a4a5a77adfc9c28d6963e5ae054c997d57cfc7fa (patch) | |
tree | 5246f8eb551abdd7c816a0ada36100751a6995ac /libbacktrace | |
parent | 247ea43cf83b9b3aeae600dbf9d4b50b197a5576 (diff) | |
download | gcc-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')
-rw-r--r-- | libbacktrace/ChangeLog | 6 | ||||
-rwxr-xr-x | libbacktrace/configure | 25 | ||||
-rw-r--r-- | libbacktrace/configure.ac | 14 |
3 files changed, 40 insertions, 5 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 729123d8bb0..7a39adccecd 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,9 @@ +2012-10-26 Jack Howarth <howarth@bromo.med.uc.edu> + + PR target/55061 + * configure.ac: Check for _Unwind_GetIPInfo function declaration. + * configure: Regenerate. + 2012-10-24 Ian Lance Taylor <iant@google.com> PR target/55061 diff --git a/libbacktrace/configure b/libbacktrace/configure index e2797370186..1f6a97b34ae 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -11619,13 +11619,32 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h fi else - ac_fn_c_check_func "$LINENO" "_Unwind_GetIPInfo" "ac_cv_func__Unwind_GetIPInfo" -if test "x$ac_cv_func__Unwind_GetIPInfo" = x""yes; then : + ac_save_CFFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror-implicit-function-declaration" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Unwind_GetIPInfo" >&5 +$as_echo_n "checking for _Unwind_GetIPInfo... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "unwind.h" + struct _Unwind_Context *context; + int ip_before_insn = 0; +int +main () +{ +return _Unwind_GetIPInfo (context, &ip_before_insn); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : have_unwind_getipinfo=yes else have_unwind_getipinfo=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_unwind_getipinfo" >&5 +$as_echo "$have_unwind_getipinfo" >&6; } if test "$have_unwind_getipinfo" = "yes"; then $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h 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 |