mirror of
https://github.com/torvalds/linux.git
synced 2024-11-07 12:41:55 +00:00
tools/perf/build: Split out feature check: 'libbfd'
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-cdxdfv7Corpfvjg9Skezhvjn@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
95d061c8a9
commit
3b7646e45d
@ -121,6 +121,7 @@ FEATURE_TESTS = \
|
||||
libperl \
|
||||
libpython \
|
||||
libpython-version \
|
||||
libbfd \
|
||||
libnuma
|
||||
|
||||
$(foreach test,$(FEATURE_TESTS),$(call feature_check,$(test),$(test)))
|
||||
@ -404,8 +405,7 @@ else
|
||||
CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
|
||||
else
|
||||
FLAGS_BFD=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd
|
||||
has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD),libbfd)
|
||||
ifeq ($(has_bfd),y)
|
||||
ifeq ($(feature-libbfd), 1)
|
||||
EXTLIBS += -lbfd
|
||||
else
|
||||
FLAGS_BFD_IBERTY=$(FLAGS_BFD) -liberty
|
||||
|
@ -19,6 +19,7 @@ FILES= \
|
||||
test-libperl \
|
||||
test-libpython \
|
||||
test-libpython-version \
|
||||
test-libbfd \
|
||||
test-libnuma
|
||||
|
||||
CC := $(CC) -MD
|
||||
@ -112,6 +113,9 @@ test-libpython:
|
||||
test-libpython-version:
|
||||
$(BUILD) $(FLAGS_PYTHON_EMBED)
|
||||
|
||||
test-libbfd:
|
||||
$(BUILD) -DPACKAGE='perf' -DPACKAGE=perf -lbfd -ldl
|
||||
|
||||
-include *.d */*.d
|
||||
|
||||
###############################
|
||||
|
7
tools/perf/config/feature-checks/test-libbfd.c
Normal file
7
tools/perf/config/feature-checks/test-libbfd.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <bfd.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
bfd_demangle(0, 0, 0);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user