perf: allow build against libelf when available
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 6 Jan 2013 05:22:46 +0000 (05:22 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 7 Jan 2013 20:39:55 +0000 (21:39 +0100)
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>
package/perf/perf.mk

index 2aef9005b8cd23713adad78f133d5b48aeb8bdb0..eed30a289c1464cf46661a58d0f133b14b3d5d8b 100644 (file)
@@ -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)