]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kconfig: check for pkg-config on make {menu,n,g,x}config
authorRandy Dunlap <rdunlap@infradead.org>
Thu, 28 Jun 2018 23:39:50 +0000 (16:39 -0700)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 17 Jul 2018 16:18:09 +0000 (01:18 +0900)
Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure
that other required files are present and to determine build flags
settings, but none of these check that pkg-config itself is present.
Add a check for all 4 of these targets and update
Documentation/process/changes.rst to mention 'pkg-config'.

Fixes kernel bugzilla #77511:
https://bugzilla.kernel.org/show_bug.cgi?id=77511

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Documentation/process/changes.rst
scripts/kconfig/Makefile
scripts/kconfig/check-pkgconfig.sh [new file with mode: 0644]

index ddc029734b25591a9cf6dbaef23db1a8ef6c2014..81930fe75a5337b11eced3df1357c5e3ef3d82b0 100644 (file)
@@ -81,6 +81,14 @@ The build system has, as of 4.13, switched to using thin archives (`ar T`)
 rather than incremental linking (`ld -r`) for built-in.a intermediate steps.
 This requires binutils 2.20 or newer.
 
+pkg-config
+----------
+
+The build system, as of 4.18, requires pkg-config to check for installed
+kconfig tools and to determine flags settings for use in
+'make {menu,n,g,x}config'.  Previously pkg-config was being used but not
+verified or documented.
+
 Flex
 ----
 
index a3ac2c91331c73e96edc6351177be5508b6713d7..49edb9cc94106291d9a5f74b87bb5132fcd2ff4c 100644 (file)
@@ -215,6 +215,7 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c
 
 # check if necessary packages are available, and configure build flags
 define filechk_conf_cfg
+       $(CONFIG_SHELL) $(srctree)/scripts/kconfig/check-pkgconfig.sh; \
        $(CONFIG_SHELL) $<
 endef
 
diff --git a/scripts/kconfig/check-pkgconfig.sh b/scripts/kconfig/check-pkgconfig.sh
new file mode 100644 (file)
index 0000000..7a1c40b
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+# Check for pkg-config presence
+
+if [ -z $(command -v pkg-config) ]; then
+       echo "'make *config' requires 'pkg-config'. Please install it." 1>&2
+       exit 1
+fi