Skip to content

Commit

Permalink
kbuild: LLVMLinux: Fix LINUX_COMPILER definition script for compilati…
Browse files Browse the repository at this point in the history
…on with clang

When building the LINUX_COMPILER definition, instead of merely taking the last
line from "$(CC) -v", grep for ' version ' in the output. This supports both
gcc and clang.

Signed-off-by: Jan-Simon Möller <[email protected]>
Signed-off-by: Behan Webster <[email protected]>
Signed-off-by: Mark Charlebois <[email protected]>
Cc: PaX Team <[email protected]>
  • Loading branch information
dl9pf authored and behanw committed Apr 9, 2014
1 parent 8a26079 commit db46293
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mkcompile_h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ 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 | tail -n 1`\"
echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version '`\"
) > .tmpcompile

# Only replace the real compile.h if the new one is different,
Expand Down

0 comments on commit db46293

Please sign in to comment.