Patchwork [06/15] perf: allow build against libelf when available

login
register
mail settings
Submitter Thomas Petazzoni
Date Jan. 6, 2013, 3:22 p.m.
Message ID <18f9e31cc74896b5e758cb8d637af0e83df5fab9.1357485747.git.thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/209766/
State Accepted
Commit 69030ca5c9324a36ecaf55aa3b23bfa5443b2c8f
Headers show

Comments

Thomas Petazzoni - Jan. 6, 2013, 3:22 p.m.
Now that libelf is available thanks to elfutils (for glibc only),
allow to build perf against it if available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/perf/perf.mk |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Patch

diff --git a/package/perf/perf.mk b/package/perf/perf.mk
index 2aef900..eed30a2 100644
--- a/package/perf/perf.mk
+++ b/package/perf/perf.mk
@@ -12,8 +12,6 @@  PERF_DEPENDENCIES = linux
 
 PERF_MAKE_FLAGS = \
 	$(LINUX_MAKE_FLAGS) \
-	NO_LIBELF=1 \
-	NO_DWARF=1 \
 	NO_LIBAUDIT=1 \
 	NO_NEWT=1 \
 	NO_GTK2=1 \
@@ -23,6 +21,12 @@  PERF_MAKE_FLAGS = \
 	prefix=/usr \
 	WERROR=0
 
+ifeq ($(BR2_PACKAGE_ELFUTILS),y)
+	PERF_DEPENDENCIES += elfutils
+else
+	PERF_MAKE_FLAGS += NO_LIBELF=1 NO_DWARF=1
+endif
+
 define PERF_BUILD_CMDS
 	$(MAKE) -C $(LINUX_DIR)/tools/perf \
 		$(PERF_MAKE_FLAGS) O=$(@D)