1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
diff -Nur a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh 2018-08-18 09:48:00.000000000 +0100
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh 2018-10-14 21:09:22.771609384 +0100
@@ -5,8 +5,8 @@
# What library to link
ldflags()
{
- pkg-config --libs ncursesw 2>/dev/null && exit
- pkg-config --libs ncurses 2>/dev/null && exit
+ $(PKG-CONFIG) --libs ncursesw 2>/dev/null && exit
+ $(PKG-CONFIG) --libs ncurses 2>/dev/null && exit
for ext in so a dll.a dylib ; do
for lib in ncursesw ncurses curses ; do
$cc -print-file-name=lib${lib}.${ext} | grep -q /
@@ -22,9 +22,9 @@
# Where is ncurses.h?
ccflags()
{
- if pkg-config --cflags ncursesw 2>/dev/null; then
+ if $(PKG-CONFIG) --cflags ncursesw 2>/dev/null; then
echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
- elif pkg-config --cflags ncurses 2>/dev/null; then
+ elif $(PKG-CONFIG) --cflags ncurses 2>/dev/null; then
echo '-DCURSES_LOC="<ncurses.h>"'
elif [ -f /usr/include/ncursesw/curses.h ]; then
echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
diff -Nur a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
--- a/scripts/kconfig/Makefile 2018-08-18 09:48:00.000000000 +0100
+++ b/scripts/kconfig/Makefile 2018-10-14 21:10:09.702147539 +0100
@@ -216,15 +216,15 @@
HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
-HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
-HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
+HOSTLOADLIBES_gconf = `$(PKG-CONFIG) --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
+HOSTCFLAGS_gconf.o = `$(PKG-CONFIG) --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
-Wno-missing-prototypes
HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
HOSTLOADLIBES_nconf = $(shell \
- pkg-config --libs menuw panelw ncursesw 2>/dev/null \
- || pkg-config --libs menu panel ncurses 2>/dev/null \
+ $(PKG-CONFIG) --libs menuw panelw ncursesw 2>/dev/null \
+ || $(PKG-CONFIG) --libs menu panel ncurses 2>/dev/null \
|| echo "-lmenu -lpanel -lncurses" )
$(obj)/qconf.o: $(obj)/.tmp_qtcheck
@@ -235,17 +235,17 @@
# Qt needs some extra effort...
$(obj)/.tmp_qtcheck:
@set -e; $(kecho) " CHECK qt"; \
- if pkg-config --exists Qt5Core; then \
- cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
- libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \
- moc=`pkg-config --variable=host_bins Qt5Core`/moc; \
- elif pkg-config --exists QtCore; then \
- cflags=`pkg-config --cflags QtCore QtGui`; \
- libs=`pkg-config --libs QtCore QtGui`; \
- moc=`pkg-config --variable=moc_location QtCore`; \
+ if $(PKG-CONFIG) --exists Qt5Core; then \
+ cflags="-std=c++11 -fPIC `$(PKG-CONFIG) --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
+ libs=`$(PKG-CONFIG) --libs Qt5Core Qt5Gui Qt5Widgets`; \
+ moc=`$(PKG-CONFIG) --variable=host_bins Qt5Core`/moc; \
+ elif $(PKG-CONFIG) --exists QtCore; then \
+ cflags=`$(PKG-CONFIG) --cflags QtCore QtGui`; \
+ libs=`$(PKG-CONFIG) --libs QtCore QtGui`; \
+ moc=`$(PKG-CONFIG) --variable=moc_location QtCore`; \
else \
echo >&2 "*"; \
- echo >&2 "* Could not find Qt via pkg-config."; \
+ echo >&2 "* Could not find Qt via $(PKG-CONFIG)."; \
echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \
echo >&2 "*"; \
exit 1; \
@@ -262,8 +262,8 @@
# GTK+ needs some extra effort, too...
$(obj)/.tmp_gtkcheck:
- @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
- if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
+ @if `$(PKG-CONFIG) --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
+ if `$(PKG-CONFIG) --atleast-version=2.0.0 gtk+-2.0`; then \
touch $@; \
else \
echo >&2 "*"; \
diff -Nur a/tools/build/feature/Makefile b/tools/build/feature/Makefile
--- a/tools/build/feature/Makefile 2018-08-18 09:48:00.000000000 +0100
+++ b/tools/build/feature/Makefile 2018-10-14 21:10:22.198558244 +0100
@@ -57,7 +57,7 @@
CC ?= $(CROSS_COMPILE)gcc
CXX ?= $(CROSS_COMPILE)g++
-PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
+PKG_CONFIG ?= $(CROSS_COMPILE)$(PKG-CONFIG)
LLVM_CONFIG ?= llvm-config
all: $(FILES)
diff -Nur a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
--- a/tools/perf/Makefile.perf 2018-08-18 09:48:00.000000000 +0100
+++ b/tools/perf/Makefile.perf 2018-10-14 21:11:19.975457787 +0100
@@ -156,7 +156,7 @@
HOSTLD ?= ld
HOSTAR ?= ar
-PKG_CONFIG = $(CROSS_COMPILE)pkg-config
+PKG_CONFIG = $(CROSS_COMPILE)$(PKG-CONFIG)
LLVM_CONFIG ?= llvm-config
RM = rm -f
diff -Nur a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
--- a/tools/testing/selftests/memfd/Makefile 2018-08-18 09:48:00.000000000 +0100
+++ b/tools/testing/selftests/memfd/Makefile 2018-10-14 21:11:09.398110027 +0100
@@ -8,8 +8,8 @@
TEST_FILES := run_fuse_test.sh
TEST_GEN_FILES := memfd_test fuse_mnt fuse_test
-fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
+fuse_mnt.o: CFLAGS += $(shell $(PKG-CONFIG) fuse --cflags)
include ../lib.mk
-$(OUTPUT)/fuse_mnt: LDLIBS += $(shell pkg-config fuse --libs)
+$(OUTPUT)/fuse_mnt: LDLIBS += $(shell $(PKG-CONFIG) fuse --libs)
diff -Nur a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile
--- a/tools/thermal/tmon/Makefile 2018-08-18 09:48:00.000000000 +0100
+++ b/tools/thermal/tmon/Makefile 2018-10-14 21:10:55.517653672 +0100
@@ -19,12 +19,12 @@
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)
-CFLAGS += $(shell pkg-config --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
- pkg-config --cflags $(STATIC) panel ncurses 2> /dev/null)
+CFLAGS += $(shell $(PKG-CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
+ $(PKG-CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
OBJS = tmon.o tui.o sysfs.o pid.o
OBJS +=
diff -Nur a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile
--- a/tools/usb/ffs-aio-example/multibuff/host_app/Makefile 2018-08-18 09:48:00.000000000 +0100
+++ b/tools/usb/ffs-aio-example/multibuff/host_app/Makefile 2018-10-14 21:10:35.307989238 +0100
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
CC = gcc
-LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
-LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0)
+LIBUSB_CFLAGS = $(shell $(PKG-CONFIG) --cflags libusb-1.0)
+LIBUSB_LIBS = $(shell $(PKG-CONFIG) --libs libusb-1.0)
WARNINGS = -Wall -Wextra
CFLAGS = $(LIBUSB_CFLAGS) $(WARNINGS)
LDFLAGS = $(LIBUSB_LIBS)
diff -Nur a/tools/usb/ffs-aio-example/simple/host_app/Makefile b/tools/usb/ffs-aio-example/simple/host_app/Makefile
--- a/tools/usb/ffs-aio-example/simple/host_app/Makefile 2018-08-18 09:48:00.000000000 +0100
+++ b/tools/usb/ffs-aio-example/simple/host_app/Makefile 2018-10-14 21:10:45.212314862 +0100
@@ -1,6 +1,6 @@
CC = gcc
-LIBUSB_CFLAGS = $(shell pkg-config --cflags libusb-1.0)
-LIBUSB_LIBS = $(shell pkg-config --libs libusb-1.0)
+LIBUSB_CFLAGS = $(shell $(PKG-CONFIG) --cflags libusb-1.0)
+LIBUSB_LIBS = $(shell $(PKG-CONFIG) --libs libusb-1.0)
WARNINGS = -Wall -Wextra
CFLAGS = $(LIBUSB_CFLAGS) $(WARNINGS)
LDFLAGS = $(LIBUSB_LIBS)
|