Commit 220490ce authored by Peter Meerwald's avatar Peter Meerwald Committed by Peter Korsgaard
Browse files

perf: Fix compilation without libelf for post-3.10 kernels



kernel commit cf4cca10 (perf tools: Move libelf check config into config/Makefile)
removes the NO_LIBELF check from the top-level Makefile

for newer kernels, if config/Makefile exists, we can assume that NO_LIBELF is
also there

Signed-off-by: default avatarPeter Meerwald <pmeerw@pmeerw.net>
Reviewed-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 687615cb
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -36,10 +36,12 @@ define PERF_BUILD_CMDS
	fi
	$(Q)if test "$(BR2_PACKAGE_ELFUTILS)" = "" ; then \
		if ! grep -q NO_LIBELF $(LINUX_DIR)/tools/perf/Makefile ; then \
			if ! test -r $(LINUX_DIR)/tools/perf/config/Makefile ; then \
				echo "The perf tool in your kernel cannot be built without libelf." ; \
				echo "Either upgrade your kernel to >= 3.7, or enable the elfutils package." ; \
				exit 1 ; \
			fi \
		fi \
	fi
	$(TARGET_MAKE_ENV) $(MAKE) -C $(LINUX_DIR)/tools/perf \
		$(PERF_MAKE_FLAGS) O=$(@D)