# HG changeset patch # User "Yann E. MORIN" # Date 1227203290 0 # Node ID 492d939dbb19978d894f30c2dcb32a4ed5e0e5df # Parent 1b4b6359a329dd154fb250406261cf683f9bbade Overide locale to C so as to have readable logs. Offer a DEBUG & EXPERIMENTAL setting to not overide locale. /trunk/scripts/crosstool.sh | 10 7 3 0 +++++++--- /trunk/config/global/ct-behave.in | 17 17 0 0 +++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff -r 1b4b6359a329 -r 492d939dbb19 config/global/ct-behave.in --- a/config/global/ct-behave.in Thu Nov 20 17:10:09 2008 +0000 +++ b/config/global/ct-behave.in Thu Nov 20 17:48:10 2008 +0000 @@ -71,4 +71,21 @@ further doesn't gain much, and takes far more time (believe me, I've got figures here! :-) ). +config NO_OVERIDE_LC_MESSAGES + bool + prompt "Do *not* overide LC_MESSAGES (EXPERIMENTAL)" + depends on EXPERIMENTAL + default n + help + By default, crosstool-NG sets and exports LC_ALL=C so that the + build.log file contains english messages, that can be read by + people most likely to help interpret the logs. If you say N here, + and your locale is not an english language, then dissecting your + log file will be difficult for most people but you. + + If you say Y here, then your current locale settings will be used + to print messages, instead of plain english. + + Say N, please. + endif diff -r 1b4b6359a329 -r 492d939dbb19 scripts/crosstool.sh --- a/scripts/crosstool.sh Thu Nov 20 17:10:09 2008 +0000 +++ b/scripts/crosstool.sh Thu Nov 20 17:48:10 2008 +0000 @@ -20,13 +20,17 @@ # - initialise logging. . "${CT_LIB_DIR}/scripts/functions" -CT_STAR_DATE=$(CT_DoDate +%s%N) -CT_STAR_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S) - # Parse the configuration file # It has some info about the logging facility, so include it early . .config +# Overide the locale early, in case we ever translate crosstool-NG messages +[ -z "${CT_NO_OVERIDE_LC_MESSAGES}" ] && export LC_ALL=C + +# Start date. Can't be done until we know the locale +CT_STAR_DATE=$(CT_DoDate +%s%N) +CT_STAR_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S) + # Yes! We can do full logging from now on! CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}"