summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Linton <jeremy.linton@arm.com>2026-07-20 13:14:54 -0500
committerShuah Khan <skhan@linuxfoundation.org>2026-07-20 17:17:36 -0600
commiteeed6071ceda7104e3397dca24cfd3dc73948150 (patch)
tree5572349b1886763ab3ab305e3efbf4434548f426
parent5100bd356cd315112c4e27e66e4f0129800eabd2 (diff)
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 <jeremy.linton@arm.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
-rw-r--r--tools/power/cpupower/Makefile4
1 files 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) $@