]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scripts/mkcompile_h: Remove trailing spaces from compiler version
authorJonathan Liu <net147@gmail.com>
Mon, 12 Jun 2017 08:23:17 +0000 (18:23 +1000)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 19 Jun 2017 13:48:15 +0000 (22:48 +0900)
Improves the output of "cat /proc/version" by getting rid of the
trailing space at the end of the compiler version when the kernel
is compiled using GCC.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/mkcompile_h

index 6fdc97ef6023da95f708dcbe9b1cc0634a99f0f2..fd8fdb91581dd45ccd9d4849428b8f87a855f26a 100755 (executable)
@@ -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 | grep ' version '`\"
+  echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version ' | sed 's/[[:space:]]*$//'`\"
 ) > .tmpcompile
 
 # Only replace the real compile.h if the new one is different,