aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/Makefile.config
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/Makefile.config')
-rw-r--r--tools/perf/Makefile.config25
1 files changed, 10 insertions, 15 deletions
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index f882ce2e25b3..c4ae70c643b9 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -890,7 +890,7 @@ ifneq ($(NO_JEVENTS),1)
endif
endif
-ifndef NO_LIBBFD
+ifdef BUILD_NONDISTRO
ifeq ($(feature-libbfd), 1)
EXTLIBS += -lbfd -lopcodes
else
@@ -913,6 +913,7 @@ ifndef NO_LIBBFD
$(call feature_check,disassembler-init-styled)
endif
+ CFLAGS += -DHAVE_LIBBFD_SUPPORT
ifeq ($(feature-libbfd-buildid), 1)
CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT
else
@@ -923,32 +924,26 @@ endif
ifdef NO_DEMANGLE
CFLAGS += -DNO_DEMANGLE
else
- ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
- EXTLIBS += -liberty
- else
+ ifdef BUILD_NONDISTRO
ifeq ($(filter -liberty,$(EXTLIBS)),)
- $(call feature_check,cplus-demangle)
-
- # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT
- # or any of 'bfd iberty z' trinity
- ifeq ($(feature-cplus-demangle), 1)
+ ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
EXTLIBS += -liberty
else
- msg := $(warning No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling)
- CFLAGS += -DNO_DEMANGLE
+ $(call feature_check,cplus-demangle)
+ ifeq ($(feature-cplus-demangle), 1)
+ EXTLIBS += -liberty
+ endif
endif
endif
endif
ifneq ($(filter -liberty,$(EXTLIBS)),)
CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
+ else
+ CFLAGS += -DNO_DEMANGLE
endif
endif
-ifneq ($(filter -lbfd,$(EXTLIBS)),)
- CFLAGS += -DHAVE_LIBBFD_SUPPORT
-endif
-
ifndef NO_ZLIB
ifeq ($(feature-zlib), 1)
CFLAGS += -DHAVE_ZLIB_SUPPORT