Commit e2b48b22 authored by Tomas Glozar's avatar Tomas Glozar Committed by Steven Rostedt (Google)
Browse files

rtla: Add optional dependency on libcpupower

If libcpupower is present, set HAVE_LIBCPUPOWER_SUPPORT macro to allow
features depending on libcpupower in rtla.

Link: https://lore.kernel.org/20241017140914.3200454-3-tglozar@redhat.com


Signed-off-by: default avatarTomas Glozar <tglozar@redhat.com>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 0f59a6c9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -32,8 +32,10 @@ DOCSRC := ../../../Documentation/tools/rtla/

FEATURE_TESTS	:= libtraceevent
FEATURE_TESTS	+= libtracefs
FEATURE_TESTS	+= libcpupower
FEATURE_DISPLAY	:= libtraceevent
FEATURE_DISPLAY	+= libtracefs
FEATURE_DISPLAY	+= libcpupower

ifeq ($(V),1)
  Q		=
+10 −0
Original line number Diff line number Diff line
@@ -43,6 +43,16 @@ else
  $(info libtracefs is missing. Please install libtracefs-dev/libtracefs-devel)
endif

$(call feature_check,libcpupower)
ifeq ($(feature-libcpupower), 1)
  $(call detected,CONFIG_LIBCPUPOWER)
  CFLAGS += -DHAVE_LIBCPUPOWER_SUPPORT
  EXTLIBS += -lcpupower
else
  $(info libcpupower is missing, building without --deepest-idle-state support.)
  $(info Please install libcpupower-dev/kernel-tools-libs-devel)
endif

ifeq ($(STOP_ERROR),1)
  $(error Please, check the errors above.)
endif