aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mkcompile_h
diff options
context:
space:
mode:
authorJan-Simon Möller <dl9pf@gmx.de>2012-11-14 04:55:48 -0500
committerBehan Webster <behanw@converseincode.com>2014-04-09 16:44:35 -0400
commitdb46293bc6866a9bcffc9cb5b1ae9c46e4f83fa7 (patch)
tree354d35b77738a2cd1ef07960b039eda9f863fc51 /scripts/mkcompile_h
parent8a260796a1019fbd064ed02fa51913727dc700b6 (diff)
kbuild: LLVMLinux: Fix LINUX_COMPILER definition script for compilation 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 <dl9pf@gmx.de> Signed-off-by: Behan Webster <behanw@converseincode.com> Signed-off-by: Mark Charlebois <charlebm@gmail.com> Cc: PaX Team <pageexec@freemail.hu>
Diffstat (limited to 'scripts/mkcompile_h')
-rwxr-xr-xscripts/mkcompile_h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index f221ddf69080..cfb8440cc0b2 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -76,7 +76,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
76 echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\" 76 echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\"
77 echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\" 77 echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\"
78 78
79 echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\" 79 echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version '`\"
80) > .tmpcompile 80) > .tmpcompile
81 81
82# Only replace the real compile.h if the new one is different, 82# Only replace the real compile.h if the new one is different,