summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/global/ct-behave.in17
-rwxr-xr-xscripts/crosstool.sh10
2 files changed, 24 insertions, 3 deletions
diff --git a/config/global/ct-behave.in b/config/global/ct-behave.in
index b477a4c..0e64de2 100644
--- a/config/global/ct-behave.in
+++ b/config/global/ct-behave.in
@@ -71,4 +71,21 @@ config DEBUG_CT_SAVE_STEPS_GZIP
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 --git a/scripts/crosstool.sh b/scripts/crosstool.sh
index 40dd01c..df47fa8 100755
--- a/scripts/crosstool.sh
+++ b/scripts/crosstool.sh
@@ -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}"