scripts: Support a custom compiler name

Signed-off-by: Joe Maples <joe@frap129.org>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
This commit is contained in:
Joe Maples 2017-12-25 22:09:02 -05:00 committed by xxmustafacooTR
parent eff249b3f1
commit c178081cc5
No known key found for this signature in database
GPG key ID: 520B6FE385CBF5C9

View file

@ -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_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\"
echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\" echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\"
echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version '`\" 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 ) > .tmpcompile
# Only replace the real compile.h if the new one is different, # Only replace the real compile.h if the new one is different,