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>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
PERF_MAKE_FLAGS = \
$(LINUX_MAKE_FLAGS) \
- NO_LIBELF=1 \
- NO_DWARF=1 \
NO_LIBAUDIT=1 \
NO_NEWT=1 \
NO_GTK2=1 \
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)