diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in index d67318571a..1e19ee7f1c 100644 --- a/package/linux-tools/linux-tool-perf.mk.in +++ b/package/linux-tools/linux-tool-perf.mk.in @@ -28,7 +28,6 @@ PERF_MAKE_FLAGS = \ NO_LIBPERL=1 \ NO_LIBPYTHON=1 \ NO_LIBBIONIC=1 \ - NO_LIBTRACEEVENT=1 \ NO_SHELLCHECK=1 # We need to pass an argument to ld for setting the emulation when @@ -128,6 +127,12 @@ PERF_MAKE_FLAGS += CORESIGHT=1 # bare "ifdef CORESIGHT" constructs. endif +ifeq ($(BR2_PACKAGE_LIBTRACEEVENT),y) +PERF_DEPENDENCIES += libtraceevent +else +PERF_MAKE_FLAGS += NO_LIBTRACEEVENT=1 +endif + # We really do not want to build the perf documentation, because it # has stringent requirement on the documentation generation tools, # like xmlto and asciidoc), which may be lagging behind on some