Skip to contentSkip to conversation

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

PATCH New s s 1 participant 1 message Dec 22, 2006 Kbuild

lore
Share & tools
lore

s s

author
#0 lore raw

PATCH 1/1 Make mkcompile_h use LANG=C and LC_ALL=C for $CC -v

Hi all,

This patch fixes 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.

Regards,
situert

scripts/mkcompile_h renamed from scripts/mkcompile_h.original +1 -1
@@ -58,7 +58,7 @@
     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,

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com