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.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -76,7 +76,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" · 75 unmodified lines | ||
| 76 | 76 | echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\" |
| 77 | 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 | 80 | ) > .tmpcompile |
| 81 | 81 | |
| 82 | 82 | # Only replace the real compile.h if the new one is different, |