mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
tools/build: Add libcpupower dependency detection
Add the ability to detect the presence of libcpupower on a system to the Makefiles in tools/build. Link: https://lore.kernel.org/20241017140914.3200454-2-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:
parent
76b3102148
commit
0f59a6c9c4
|
|
@ -53,6 +53,7 @@ FEATURE_TESTS_BASIC := \
|
|||
libslang-include-subdir \
|
||||
libtraceevent \
|
||||
libtracefs \
|
||||
libcpupower \
|
||||
libcrypto \
|
||||
libunwind \
|
||||
pthread-attr-setaffinity-np \
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ FILES= \
|
|||
test-libslang.bin \
|
||||
test-libslang-include-subdir.bin \
|
||||
test-libtraceevent.bin \
|
||||
test-libcpupower.bin \
|
||||
test-libtracefs.bin \
|
||||
test-libcrypto.bin \
|
||||
test-libunwind.bin \
|
||||
|
|
@ -245,6 +246,9 @@ $(OUTPUT)test-libslang-include-subdir.bin:
|
|||
$(OUTPUT)test-libtraceevent.bin:
|
||||
$(BUILD) -ltraceevent
|
||||
|
||||
$(OUTPUT)test-libcpupower.bin:
|
||||
$(BUILD) -lcpupower
|
||||
|
||||
$(OUTPUT)test-libtracefs.bin:
|
||||
$(BUILD) $(shell $(PKG_CONFIG) --cflags libtracefs 2>/dev/null) -ltracefs
|
||||
|
||||
|
|
|
|||
8
tools/build/feature/test-libcpupower.c
Normal file
8
tools/build/feature/test-libcpupower.c
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <cpuidle.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int rv = cpuidle_state_count(0);
|
||||
return rv;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user