Skip to contentSkip to conversation

cpupower: Fix linking with --as-needed

PATCH Applied Ozan Çağlayan 2 participants 2 messages Jan 19, 2012 – Feb 5, 2012 CPU power monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpupower: Fix linking with --as-needed

Fix linking order to avoid undefined reference errors when using --as-needed linker flag.

---
 tools/power/cpupower/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/power/cpupower/Makefile +1 -1
index e8a03ac..f01b3f5 100644
@@ -193,7 +193,7 @@ $(UTIL_OBJS): $(UTIL_HEADERS)
 
 cpupower: $(UTIL_OBJS) libcpupower.so.$(LIB_MAJ)
 	$(ECHO) "  CC      " $@
-	$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -lcpupower -lrt -lpci -L. -o $@ $(UTIL_OBJS)
+	$(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) $(UTIL_OBJS) -lcpupower -lrt -lpci -L. -o $@
 	$(QUIET) $(STRIPCMD) $@
 
 po/$(PACKAGE).pot: $(UTIL_SRC)
Signature · 1 line
1.7.7.1
#1 lore raw
Quoted 2 lines · Ozan Çağlayan

Fix linking order to avoid undefined reference errors when using --as-needed linker flag.

Applied, thanks.

Best,
Dominik