perf: Don't build backtrace for ARC
authorMischa Jonker <mischa.jonker@synopsys.com>
Tue, 28 Jan 2014 13:10:58 +0000 (14:10 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 21 Jul 2014 20:53:29 +0000 (22:53 +0200)
[Thomas: add more details as a comment in the code, provided by Anton
Kolesov.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/perf/perf.mk

index ffeec0282f2430ab0a2b2211ef946663e5fa881f..1fcc25863ffad6a685ba80f80c9cfc6bc2bb0ed8 100644 (file)
@@ -22,6 +22,16 @@ PERF_MAKE_FLAGS = \
        WERROR=0 \
        ASCIIDOC=
 
+# The call to backtrace() function fails for ARC, because for some
+# reason the unwinder from libgcc returns early. Thus the usage of
+# backtrace() should be disabled in perf explicitly: at build time
+# backtrace() appears to be available, but it fails at runtime: the
+# backtrace will contain only several functions from the top of stack,
+# instead of the complete backtrace.
+ifeq ($(BR2_arc),y)
+       PERF_MAKE_FLAGS += NO_BACKTRACE=1
+endif
+
 ifeq ($(BR2_PACKAGE_ELFUTILS),y)
        PERF_DEPENDENCIES += elfutils
 else