Skip to content

Commit

Permalink
scripts: Support a custom compiler name
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Maples <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: mcdachpappe <[email protected]>
  • Loading branch information
Joe Maples authored and mcdachpappe committed Nov 14, 2022
1 parent 01290f9 commit 6ea5f0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/mkcompile_h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6ea5f0d

Please sign in to comment.