lkml.org 
[lkml]   [2019]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] use bash instead of sh to run mkcompile_h
Date
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
\
 
 \ /
  Last update: 2019-12-25 06:59    [W:0.022 / U:16.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site