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:
parent
eff249b3f1
commit
c178081cc5
1 changed files with 5 additions and 1 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue