summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2018-12-13 09:34:08 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-17 12:26:14 +0100
commitbba1bd47b509f1347d1a383ec75f2d8368555ee4 (patch)
tree7311d3499061ecf2851341e728080ab291aafed5
parent392ae40c2c10e0bf657723bc3fdd8a9a7fa54b77 (diff)
downloadbarebox-bba1bd47b509f1347d1a383ec75f2d8368555ee4.tar.gz
barebox-bba1bd47b509f1347d1a383ec75f2d8368555ee4.tar.xz
scripts/mkcompile_h: Remove trailing spaces from compiler version
This is an adoption of the linux kernel commit | commit adcc3f7cee29eb831f79f4ac7ba6a0fbce7ac936 | Author: Jonathan Liu <net147@gmail.com> | Date: Mon Jun 12 18:23:17 2017 +1000 | | scripts/mkcompile_h: Remove trailing spaces from compiler version | | 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> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rwxr-xr-xscripts/mkcompile_h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 1a80ef7c70..60b20cafc6 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -72,7 +72,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
echo \#define BAREBOX_COMPILE_BY \"`echo $BAREBOX_COMPILE_BY | $UTS_TRUNCATE`\"
echo \#define BAREBOX_COMPILE_HOST \"`echo $BAREBOX_COMPILE_HOST | $UTS_TRUNCATE`\"
- echo \#define BAREBOX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
+ echo \#define BAREBOX_COMPILER \"`$CC -v 2>&1 | grep ' version ' | sed 's/[[:space:]]*$//'`\"
) > .tmpcompile
# Only replace the real compile.h if the new one is different,