[PATCH] cpupower: Add libm to cpupower for generic CPPC view

Jeremy Linton posted 1 patch 4 days, 7 hours ago
tools/power/cpupower/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] cpupower: Add libm to cpupower for generic CPPC view
Posted by Jeremy Linton 4 days, 7 hours ago
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>
---
 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) $@
 
-- 
2.55.0