History

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.

Jan-Simon Möller committed 14 years ago

Commit db462931 parent 8a260791 file · +1 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/mkcompile_h+1−1
@@ -76,7 +76,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" · 75 unmodified lines
7676 echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\"
7777 echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\"
7878
79− echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
79+ echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version '`\"
8080 ) > .tmpcompile
8181
8282 # Only replace the real compile.h if the new one is different,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t