lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1438988284-8453-1-git-send-email-f.fainelli@gmail.com>
Date:	Fri,  7 Aug 2015 15:58:02 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	linux-kernel@...r.kernel.org, rui.zhang@...el.com,
	jacob.jun.pan@...ux.intel.com
Cc:	gregory.0xf0@...il.com, Florian Fainelli <f.fainelli@...il.com>,
	Brian Norris <computersforpeace@...il.com>,
	Anand Moon <linux.amoon@...il.com>
Subject: [PATCH] tools/thermal: tmon: Allow overriding pkg-config

Some build systems might not ship with a proper pkg-config
infrastructure, so picking up the host pkg-config might cause us to link
with ncursesw which may not be present in the build environment.

Allow an external build system to override the pkg-config value (e.g:
set it to /bin/false if we do not have anything).

Fixes: 96a0d99c72cc ("tools/thermal: tmon: use pkg-config to determine library dependencies")
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
 tools/thermal/tmon/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
index 2e83dd3655a2..3777ab59d08c 100644
--- a/tools/thermal/tmon/Makefile
+++ b/tools/thermal/tmon/Makefile
@@ -11,6 +11,7 @@ TARGET=tmon
 
 INSTALL_PROGRAM=install -m 755 -p
 DEL_FILE=rm -f
+PKG_CONFIG?=pkg-config
 
 # Static builds might require -ltinfo, for instance
 ifneq ($(findstring -static, $(LDFLAGS)),)
@@ -18,8 +19,8 @@ STATIC := --static
 endif
 
 TMON_LIBS=-lm -lpthread
-TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \
-		     pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \
+TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \
+		     $(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
 		     echo -lpanel -lncurses)
 
 OBJS = tmon.o tui.o sysfs.o pid.o
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ