libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] tests/Gperf-trace.c does not compile on uCLibC


From: Arun Sharma
Subject: Re: [Libunwind-devel] tests/Gperf-trace.c does not compile on uCLibC
Date: Thu, 18 Aug 2011 21:20:10 -0700

On Wed, Aug 17, 2011 at 7:43 AM, Sven Neumann <address@hidden> wrote:
>> backtrace(3) is only needed for tests, as you noted. libunwind already allows
>> the backtrace(3) to come from libexecinfo, this was done for FreeBSD
>> that also does not implement backtrace in libc. Requiring a library
>> for testing is reasonable, IMO.
>
> Then perhaps the easiest solution is to add a configure option to skip
> all tests. That would allow building on platforms where the tests don't
> compile easily.

Is this the only build problem you had in the "tests" subdir or were
there other breakages with your libc?

Does the patch below work for you?

 -Arun

--- a/configure.in
+++ b/configure.in
@@ -276,6 +276,7 @@ PKG_MAINTAINER=pkg_maintainer
 old_LIBS="$LIBS"
 LIBS=""
 AC_SEARCH_LIBS(backtrace, execinfo)
+AM_CONDITIONAL(HAVE_BACKTRACE, test "x$ac_cv_search_backtrace" != xno)
 BACKTRACELIB="$LIBS"
 LIBS="$old_LIBS"

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 59ad3b3..fbf5f81 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -47,8 +47,11 @@ endif #ARCH_IA64
                        test-mem test-setjmp test-ptrace                 \
                        Ltest-nomalloc Ltest-nocalloc rs-race
  noinst_PROGRAMS_cdep = forker mapper test-ptrace-misc test-varargs    \
-                       Gperf-simple Lperf-simple                       \
-                       Gperf-trace Lperf-trace
+                       Gperf-simple Lperf-simple
+
+if HAVE_BACKTRACE
+ noinst_PROGRAMS_cdep += Gperf-trace Lperf-trace
+endif

 if SUPPORT_CXX_EXCEPTIONS
  check_PROGRAMS_cdep += Ltest-cxx-exceptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]