From d1d5bb9b221c4ca697d2222ebe81b29fff589302 Mon Sep 17 00:00:00 2001 From: Joe Maples Date: Mon, 25 Dec 2017 22:09:02 -0500 Subject: scripts: Support a custom compiler name Signed-off-by: Joe Maples Signed-off-by: Nathan Chancellor --- scripts/mkcompile_h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index fd8fdb91581d..5c723833ec54 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -76,7 +76,11 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\" echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\" - echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version ' | sed 's/[[:space:]]*$//'`\" + if [ -z "$KBUILD_COMPILER_STRING" ]; then + echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version ' | sed 's/[[:space:]]*$//'`\" + else + echo \#define LINUX_COMPILER \"$KBUILD_COMPILER_STRING\" + fi; ) > .tmpcompile # Only replace the real compile.h if the new one is different, -- cgit v1.2.3