summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alk@tut.by>2014-02-16 19:41:37 -0800
committerAliaksey Kandratsenka <alk@tut.by>2014-02-16 19:41:37 -0800
commitb5e584dfdc22328f713488311707f502aa77ff5f (patch)
tree23a0ee40fbbbb24731c0785a09342c0cca26bdcb
parent90ba15d1f2f6704af96f62ce1e8c5f214697bab1 (diff)
downloadgperftools-b5e584dfdc22328f713488311707f502aa77ff5f.tar.gz
issue-525: warn user on lack of libunwind but don't fail
Because we now have access to other backtrace capturing method(s) at runtime.
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8023cb3..ab0c31a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -217,6 +217,7 @@ AC_ARG_ENABLE(frame_pointers,
, enable_frame_pointers=no)
AM_CONDITIONAL(ENABLE_FRAME_POINTERS, test "$enable_frame_pointers" = yes)
+AC_MSG_CHECKING([for x86 without frame pointers])
# Some x86_64 systems do not insert frame pointers by default.
# We want to see if the current system is one of those.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __x86_64__ == 1 ? 0 : 1])],
@@ -227,10 +228,14 @@ CFLAGS="$CFLAGS -S -O2 -o fp.s"
# We do our own determination of success/failure in the grep, below.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int f(int x) {return x;}], [return f(0);])],
[:], [:])
+x86_no_fp_by_default=no
+AS_IF([test "$is_x86_64" = yes && ! grep 'mov.*rsp.*rbp' fp.s >/dev/null 2>&1], [x86_no_fp_by_default=yes])
AM_CONDITIONAL(X86_64_AND_NO_FP_BY_DEFAULT,
- test "$is_x86_64" = yes && ! grep 'mov.*rsp.*rbp' fp.s >/dev/null 2>&1)
+ test "$x86_no_fp_by_default" = yes)
rm fp.s
CFLAGS="$OLD_CFLAGS"
+AC_MSG_RESULT([$x86_no_fp_by_default])
+
# We need to know if we're i386 so we can turn on -mmms, which is not
# on by default for i386 (it is for x86_64).
@@ -464,3 +469,6 @@ AM_CONDITIONAL(WITH_STACK_TRACE, test "$enable_cpu_profiler" = yes -o \
AC_CONFIG_FILES([Makefile
src/gperftools/tcmalloc.h src/windows/gperftools/tcmalloc.h])
AC_OUTPUT
+
+AS_IF([test "$x86_no_fp_by_default" = yes && test "x$UNWIND_LIBS" = x],
+ [AC_MSG_WARN([No frame pointers and no libunwind. Expect backtrace capturing and unittests to fail])])