aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Maples <joe@frap129.org>2017-12-25 22:09:02 -0500
committerMichele Bono <bono.michele94@gmail.com>2019-09-10 23:33:24 +0200
commit6b7d597815e02e81e670d1baa898a3f9dd5c5224 (patch)
treeea0452db7f0996171b284e705200c6c8cae7aebe
parent40471c9032b1c74682bdf8a37d07e161e1729e9f (diff)
scripts: Support a custom compiler namep9.0
Signed-off-by: Joe Maples <joe@frap129.org> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: khusika <khusikadhamar@gmail.com> Change-Id: I740490346c4947ec1743989cd9f3fe719f088bac
-rwxr-xr-xscripts/mkcompile_h6
1 files changed, 5 insertions, 1 deletions
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,