powertop: fix compilation with glibc
authorRosen Penev <redacted>
Tue, 14 Apr 2020 06:34:39 +0000 (23:34 -0700)
committerRosen Penev <redacted>
Thu, 18 Jun 2020 22:29:24 +0000 (15:29 -0700)
It seems several libraries need to be linked.

Signed-off-by: Rosen Penev <redacted>
utils/powertop/Makefile

index 4fa32c542d8edc14e97f0aa262d01f58bf54e8b0..68953d4937f20183fe6bc6f521d384add9eace86 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=powertop
 PKG_VERSION:=2.10
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://01.org/sites/default/files/downloads/
@@ -39,13 +39,10 @@ define Package/powertop/description
  and power management.
 endef
 
-TARGET_CFLAGS += $(FPIC)
-ifeq ($(CONFIG_USE_UCLIBC),y)
-TARGET_CFLAGS += -fno-stack-protector
-endif
-TARGET_LDFLAGS += $(if $(INTL_FULL),-lintl)
-
-CONFIGURE_ARGS += --without-pic
+TARGET_LDFLAGS += \
+       $(if $(INTL_FULL),-lintl) \
+       $(if $(CONFIG_USE_GLIBC),-lm) \
+       $(if $(CONFIG_USE_GLIBC),-lpthread)
 
 define Package/powertop/install
        $(INSTALL_DIR) $(1)/usr/sbin
git clone https://git.99rst.org/PROJECT