Skip to content

Commit

Permalink
[PATCH] Make mkcompile_h use LANG=C and LC_ALL=C for $CC -v
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
s situert authored and Linus Torvalds committed Feb 14, 2007
1 parent 8c7e449 commit 895a39a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mkcompile_h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 895a39a

Please sign in to comment.