mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 06:30:56 +07:00
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.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
34ef21622f
commit
4cc9117a35
@ -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
|
||||
|
||||
###############################
|
||||
|
10
tools/perf/config/feature-checks/test-backtrace.c
Normal file
10
tools/perf/config/feature-checks/test-backtrace.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include <execinfo.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
backtrace(NULL, 0);
|
||||
backtrace_symbols(NULL, 0);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user