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: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
Tomas Glozar 2024-10-17 16:09:10 +02:00 committed by Steven Rostedt (Google)
parent 0f59a6c9c4
commit e2b48b226b
2 changed files with 12 additions and 0 deletions

View File

@ -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 =

View File

@ -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