* [PATCH] kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
@ 2019-03-08 5:49 Masahiro Yamada
2019-03-13 17:42 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2019-03-08 5:49 UTC (permalink / raw)
To: linux-kbuild
Cc: Masahiro Yamada, Nicholas Piggin, Michael Forney, Sam Ravnborg,
linux-kernel, Palmer Dabbelt, Nicolas Pitre
As commit 423a8155facf ("kbuild: Fix reading of .config in
link-vmlinux.sh") addressed, some shells fail to perform '.' if
${KCONFIG_CONFIG} does not contain a slash at all.
Instead, we can source include/config/auto.conf, which obviously
contain slashes, and we do not expect its file path overridden by
a user. Perhaps, the performance might be slightly better since
unset CONFIG options are stripped from include/config/auto.conf.
scripts/setlocalversion already works this way.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
scripts/adjust_autoksyms.sh | 9 +--------
scripts/link-vmlinux.sh | 9 +--------
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
index 6e6d639..84bf6b5 100755
--- a/scripts/adjust_autoksyms.sh
+++ b/scripts/adjust_autoksyms.sh
@@ -39,14 +39,7 @@ case "$KBUILD_VERBOSE" in
esac
# We need access to CONFIG_ symbols
-case "${KCONFIG_CONFIG}" in
-*/*)
- . "${KCONFIG_CONFIG}"
- ;;
-*)
- # Force using a file from the current directory
- . "./${KCONFIG_CONFIG}"
-esac
+. include/config/auto.conf
# Generate a new ksym list file with symbols needed by the current
# set of modules.
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index bc7f1fc..dc0e8c5 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -171,14 +171,7 @@ if [ "$1" = "clean" ]; then
fi
# We need access to CONFIG_ symbols
-case "${KCONFIG_CONFIG}" in
-*/*)
- . "${KCONFIG_CONFIG}"
- ;;
-*)
- # Force using a file from the current directory
- . "./${KCONFIG_CONFIG}"
-esac
+. include/config/auto.conf
# Update version
info GEN .version
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG}
2019-03-08 5:49 [PATCH] kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG} Masahiro Yamada
@ 2019-03-13 17:42 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2019-03-13 17:42 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Nicholas Piggin, Michael Forney, Sam Ravnborg,
Linux Kernel Mailing List, Palmer Dabbelt, Nicolas Pitre
On Fri, Mar 8, 2019 at 2:50 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> As commit 423a8155facf ("kbuild: Fix reading of .config in
> link-vmlinux.sh") addressed, some shells fail to perform '.' if
> ${KCONFIG_CONFIG} does not contain a slash at all.
>
> Instead, we can source include/config/auto.conf, which obviously
> contain slashes, and we do not expect its file path overridden by
> a user. Perhaps, the performance might be slightly better since
> unset CONFIG options are stripped from include/config/auto.conf.
>
> scripts/setlocalversion already works this way.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Applied to linux-kbuild.
> scripts/adjust_autoksyms.sh | 9 +--------
> scripts/link-vmlinux.sh | 9 +--------
> 2 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
> index 6e6d639..84bf6b5 100755
> --- a/scripts/adjust_autoksyms.sh
> +++ b/scripts/adjust_autoksyms.sh
> @@ -39,14 +39,7 @@ case "$KBUILD_VERBOSE" in
> esac
>
> # We need access to CONFIG_ symbols
> -case "${KCONFIG_CONFIG}" in
> -*/*)
> - . "${KCONFIG_CONFIG}"
> - ;;
> -*)
> - # Force using a file from the current directory
> - . "./${KCONFIG_CONFIG}"
> -esac
> +. include/config/auto.conf
>
> # Generate a new ksym list file with symbols needed by the current
> # set of modules.
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index bc7f1fc..dc0e8c5 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -171,14 +171,7 @@ if [ "$1" = "clean" ]; then
> fi
>
> # We need access to CONFIG_ symbols
> -case "${KCONFIG_CONFIG}" in
> -*/*)
> - . "${KCONFIG_CONFIG}"
> - ;;
> -*)
> - # Force using a file from the current directory
> - . "./${KCONFIG_CONFIG}"
> -esac
> +. include/config/auto.conf
>
> # Update version
> info GEN .version
> --
> 2.7.4
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-13 17:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 5:49 [PATCH] kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG} Masahiro Yamada
2019-03-13 17:42 ` 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.