aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2012-09-19 22:57:53 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-09-19 22:57:53 +0000
commit64b89453bce993860d16b1e610b38401a0462086 (patch)
treeb1949689ab7e790238a76412db253ed63c9db39c /libbacktrace
parent7f7c81909221af5c3c4e6ffad404207c29ea953d (diff)
downloadgcc-64b89453bce993860d16b1e610b38401a0462086.zip
gcc-64b89453bce993860d16b1e610b38401a0462086.tar.gz
gcc-64b89453bce993860d16b1e610b38401a0462086.tar.bz2
configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library.
* configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library. * configure: Rebuild. From-SVN: r191503
Diffstat (limited to 'libbacktrace')
-rw-r--r--libbacktrace/ChangeLog6
-rwxr-xr-xlibbacktrace/configure15
-rw-r--r--libbacktrace/configure.ac10
3 files changed, 30 insertions, 1 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index ea9ff2f..e5baeb5 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-19 Ian Lance Taylor <iant@google.com>
+
+ * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
+ as a target library.
+ * configure: Rebuild.
+
2012-09-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Ian Lance Taylor <iant@google.com>
diff --git a/libbacktrace/configure b/libbacktrace/configure
index bbd5d11..a57b51b 100755
--- a/libbacktrace/configure
+++ b/libbacktrace/configure
@@ -11734,6 +11734,7 @@ fi
+if test -n "${with_target_subdir}"; then
# Check whether --with-system-libunwind was given.
@@ -11770,6 +11771,20 @@ $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 :
+ have_unwind_getipinfo=yes
+else
+ have_unwind_getipinfo=no
+fi
+
+ if test "$have_unwind_getipinfo" = "yes"; then
+
+$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
+
+ fi
+fi
# When building as a target library, shared libraries may want to link
# this in. We don't want to provide another shared library to
diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac
index 4e0abba..b21beea 100644
--- a/libbacktrace/configure.ac
+++ b/libbacktrace/configure.ac
@@ -98,7 +98,15 @@ fi
AC_SUBST(WARN_FLAGS)
-GCC_CHECK_UNWIND_GETIPINFO
+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])
+ if test "$have_unwind_getipinfo" = "yes"; then
+ AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
+ fi
+fi
# When building as a target library, shared libraries may want to link
# this in. We don't want to provide another shared library to