* [PATCH v4] kconfig: check for pkg-config on make {menu,n,g,x}config
@ 2018-06-28 23:39 Randy Dunlap
2018-06-30 14:19 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-06-28 23:39 UTC (permalink / raw)
To: linux-kbuild, LKML, Masahiro Yamada; +Cc: Bjørn Forsman
From: Randy Dunlap <rdunlap@infradead.org>
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>
---
v4: apply Masahiro's suggestions
Strictly speaking, pkg-config is not required if someone is only
using 'make {menu,n}config' since there are fallbacks for those
two targets.
Documentation/process/changes.rst | 8 ++++++++
scripts/kconfig/Makefile | 1 +
scripts/kconfig/check-pkgconfig.sh | 8 ++++++++
3 files changed, 17 insertions(+)
--- linux-next-20180628.orig/scripts/kconfig/Makefile
+++ linux-next-20180628/scripts/kconfig/Makefile
@@ -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
--- /dev/null
+++ linux-next-20180628/scripts/kconfig/check-pkgconfig.sh
@@ -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
--- linux-next-20180628.orig/Documentation/process/changes.rst
+++ linux-next-20180628/Documentation/process/changes.rst
@@ -81,6 +81,14 @@ The build system has, as of 4.13, switch
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
----
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v4] kconfig: check for pkg-config on make {menu,n,g,x}config
2018-06-28 23:39 [PATCH v4] kconfig: check for pkg-config on make {menu,n,g,x}config Randy Dunlap
@ 2018-06-30 14:19 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2018-06-30 14:19 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-kbuild, LKML, Bjørn Forsman
2018-06-29 8:39 GMT+09:00 Randy Dunlap <rdunlap@infradead.org>:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> 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>
> ---
Applied to linux-kbuild/kconfig. Thanks!
> v4: apply Masahiro's suggestions
>
> Strictly speaking, pkg-config is not required if someone is only
> using 'make {menu,n}config' since there are fallbacks for those
> two targets.
>
> Documentation/process/changes.rst | 8 ++++++++
> scripts/kconfig/Makefile | 1 +
> scripts/kconfig/check-pkgconfig.sh | 8 ++++++++
> 3 files changed, 17 insertions(+)
>
> --- linux-next-20180628.orig/scripts/kconfig/Makefile
> +++ linux-next-20180628/scripts/kconfig/Makefile
> @@ -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
>
> --- /dev/null
> +++ linux-next-20180628/scripts/kconfig/check-pkgconfig.sh
> @@ -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
> --- linux-next-20180628.orig/Documentation/process/changes.rst
> +++ linux-next-20180628/Documentation/process/changes.rst
> @@ -81,6 +81,14 @@ The build system has, as of 4.13, switch
> 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
> ----
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-30 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-28 23:39 [PATCH v4] kconfig: check for pkg-config on make {menu,n,g,x}config Randy Dunlap
2018-06-30 14:19 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.