From eeed6071ceda7104e3397dca24cfd3dc73948150 Mon Sep 17 00:00:00 2001 From: Jeremy Linton Date: Mon, 20 Jul 2026 13:14:54 -0500 Subject: [PATCH] cpupower: Add libm to cpupower for generic CPPC view The patch ("cpupower: Add generic CPPC performance display") uses roundf() but didn't include libm explicitly. This results in build breaks in environments where its not automatically inlined. Add libm to the cpupower makefile to correct this. Fixes: 68f34fad760b ("cpupower: Add generic CPPC performance display") Signed-off-by: Jeremy Linton Signed-off-by: Shuah Khan --- tools/power/cpupower/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index cd8b7315fe74..ab428e336d87 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -236,9 +236,9 @@ $(OUTPUT)%.o: %.c $(OUTPUT)cpupower: $(UTIL_OBJS) $(OUTPUT)$(LIBCPUPOWER) $(ECHO) " CC " $@ ifeq ($(strip $(STATIC)),true) - $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lrt -lpci -L$(OUTPUT) -o $@ + $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lm -lrt -lpci -L$(OUTPUT) -o $@ else - $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lcpupower -lrt -lpci -L$(OUTPUT) -o $@ + $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lm -lcpupower -lrt -lpci -L$(OUTPUT) -o $@ endif $(QUIET) $(STRIPCMD) $@