Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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: default avatarIngo Molnar <mingo@kernel.org>
parent 95d061c8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
+4 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
#include <bfd.h>

int main(void)
{
	bfd_demangle(0, 0, 0);
	return 0;
}