Commit 4cc9117a authored by Ingo Molnar's avatar Ingo Molnar

tools/perf/build: Split out feature check: 'backtrace'

Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-ihnwe6cvglVkudyvcavP1wql@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 34ef2162
......@@ -124,6 +124,7 @@ FEATURE_TESTS = \
strlcpy \
libbfd \
on-exit \
backtrace \
libnuma
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
......@@ -448,7 +449,7 @@ ifndef NO_ON_EXIT
endif
ifndef NO_BACKTRACE
ifeq ($(call try-cc,$(SOURCE_BACKTRACE),,-DHAVE_BACKTRACE_SUPPORT),y)
ifeq ($(feature-backtrace), 1)
CFLAGS += -DHAVE_BACKTRACE_SUPPORT
endif
endif
......
......@@ -22,6 +22,7 @@ FILES= \
test-strlcpy \
test-libbfd \
test-on-exit \
test-backtrace \
test-libnuma
CC := $(CC) -MD
......@@ -124,6 +125,9 @@ test-libbfd:
test-on-exit:
$(BUILD)
test-backtrace:
$(BUILD)
-include *.d */*.d
###############################
......
#include <execinfo.h>
#include <stdio.h>
int main(void)
{
backtrace(NULL, 0);
backtrace_symbols(NULL, 0);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment