Commit 3b7646e4 authored by Ingo Molnar's avatar Ingo Molnar

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.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 95d061c8
......@@ -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
###############################
......
#include <bfd.h>
int main(void)
{
bfd_demangle(0, 0, 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