perf: restrict libunwind dependency to archs that actually support libunwind
[openwrt/staging/luka.git] / package / devel / perf / Makefile
index 8ff9bfa5e2d5a554b007971effb51e20c77ff94c..61388580d56f3d9ae0b57bc6d23f7aa47692629f 100644 (file)
@@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/perf
   SECTION:=devel
   CATEGORY:=Development
-  DEPENDS:= +libelf1 +libdw +libpthread +librt +objdump @!LINUX_3_18 @!IN_SDK
+  DEPENDS:= +libelf1 +libdw +(mips||mipsel||powerpc||i386||x86_64||arm||aarch64):libunwind +libpthread +librt +objdump @!LINUX_3_18 @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS
   TITLE:=Linux performance monitoring tool
   VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
   URL:=http://www.kernel.org
@@ -51,6 +51,7 @@ MAKE_FLAGS = \
        NO_GTK2=1 \
        NO_LIBAUDIT=1 \
        NO_LIBCRYPTO=1 \
+       NO_LIBUNWIND=1 \
        CROSS_COMPILE="$(TARGET_CROSS)" \
        CC="$(TARGET_CC)" \
        LD="$(TARGET_CROSS)ld" \
@@ -60,9 +61,11 @@ MAKE_FLAGS = \
        WERROR=0 \
        prefix=/usr
 
+ifdef CONFIG_LINUX_4_4
 ifdef CONFIG_USE_MUSL
  MAKE_FLAGS += EXTRA_CFLAGS="-I$(CURDIR)/musl-include -include $(CURDIR)/musl-compat.h -D__UCLIBC__"
 endif
+endif
 
 define Build/Compile
        +$(MAKE_FLAGS) $(MAKE) $(PKG_JOBS) \