]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
rtla: Add optional dependency on libcpupower
authorTomas Glozar <tglozar@redhat.com>
Thu, 17 Oct 2024 14:09:10 +0000 (16:09 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 17 Oct 2024 21:13:15 +0000 (17:13 -0400)
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>
tools/tracing/rtla/Makefile
tools/tracing/rtla/Makefile.config

index b5878be361257a41ed31b754c13775920cb7971c..a6a7dee16622d2b916de34c19b4960dafc113978 100644 (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            =
index 5f8c286712d4c11c01500a71f44f5b3a4dc6a458..92a6e12e42d3a8af8022f62e742dd677a8f6376a 100644 (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