提交 895a39a0 编写于 作者: S s situert 提交者: Linus Torvalds

[PATCH] Make mkcompile_h use LANG=C and LC_ALL=C for $CC -v

Fix a minor bug in mkcompile_h.  As one can see, the current locale is used
while getting the version of gcc.  This produces problems when a locale
other than C or en_US is used.  As an example, my /proc/version contains
Turkish characters in iso-8859-9 encoding.

This patch fixes this issue by making sure that the C locale is used to get
gcc's version.

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8c7e4498
......@@ -58,7 +58,7 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
echo \#define LINUX_COMPILE_DOMAIN
fi
echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\"
echo \#define LINUX_COMPILER \"`LC_ALL=C LANG=C $CC -v 2>&1 | tail -n 1`\"
) > .tmpcompile
# Only replace the real compile.h if the new one is different,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册