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: 68f34fad76 ("cpupower: Add generic CPPC performance display")
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
Jeremy Linton
2026-07-20 13:14:54 -05:00
committed by Shuah Khan
parent 5100bd356c
commit eeed6071ce

View File

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