* [PATCH] use bash instead of sh to run mkcompile_h
@ 2019-12-25 5:58 Liangcai Fan
2019-12-26 9:25 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Liangcai Fan @ 2019-12-25 5:58 UTC (permalink / raw)
To: masahiroy, michal.lkml
Cc: linux-kernel, linux-kbuild, zhang.lyra, gengcixi, orson.zhai,
Liangcai Fan, Liangcai Fan
From: Liangcai Fan <liangcai.fan@unisoc.com>
Use sh to run mkcompile_h, compilation would fail if whoami contains
backslash, since sh uses dash. The reason is that the echo command would
interpret backslash to escapes, so the LINUX_COMPILE_BY definition was
incorrect.
Parse mkcompile_h with bash, the echo command would not see backslash as
escapes, then there is no error with the definition of LINUX_COMPILE_BY.
Signed-off-by: Liangcai Fan <liangcai.fan@unisoc.com>
Signed-off-by: Liangcai Fan <fanliangcai9@gmail.com>
---
init/Makefile | 2 +-
scripts/mkcompile_h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/Makefile b/init/Makefile
index 6246a06..9348d17 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -33,6 +33,6 @@ $(obj)/version.o: include/generated/compile.h
silent_chk_compile.h = :
include/generated/compile.h: FORCE
@$($(quiet)chk_compile.h)
- $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
+ $(Q)$(BASH) $(srctree)/scripts/mkcompile_h $@ \
"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" \
"$(CONFIG_PREEMPT_RT)" "$(CC) $(KBUILD_CFLAGS)"
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 3a5a4b2..cfc2e2a 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
TARGET=$1
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] use bash instead of sh to run mkcompile_h
2019-12-25 5:58 [PATCH] use bash instead of sh to run mkcompile_h Liangcai Fan
@ 2019-12-26 9:25 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2019-12-26 9:25 UTC (permalink / raw)
To: Liangcai Fan
Cc: Michal Marek, Linux Kernel Mailing List,
Linux Kbuild mailing list, zhang.lyra, gengcixi, orson.zhai,
Liangcai Fan
On Wed, Dec 25, 2019 at 2:58 PM Liangcai Fan <fanliangcai9@gmail.com> wrote:
>
> From: Liangcai Fan <liangcai.fan@unisoc.com>
>
> Use sh to run mkcompile_h, compilation would fail if whoami contains
> backslash, since sh uses dash. The reason is that the echo command would
> interpret backslash to escapes, so the LINUX_COMPILE_BY definition was
> incorrect.
>
> Parse mkcompile_h with bash, the echo command would not see backslash as
> escapes, then there is no error with the definition of LINUX_COMPILE_BY.
>
> Signed-off-by: Liangcai Fan <liangcai.fan@unisoc.com>
> Signed-off-by: Liangcai Fan <fanliangcai9@gmail.com>
> ---
This problem was fixed by
commit c8f3dea90e38194dae542c5d56e05d30447e58cb
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-26 9:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25 5:58 [PATCH] use bash instead of sh to run mkcompile_h Liangcai Fan
2019-12-26 9:25 ` 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.