diff mbox

[U-Boot,1/2] buildman: disable localized and unicode output of all build tools

Message ID 20170608010709.28197-2-daniel.schwierzeck@gmail.com
State Accepted
Commit b0e994c29e726dc0ba02a44adbd050f5f9f0b995
Delegated to: Simon Glass
Headers show

Commit Message

Daniel Schwierzeck June 8, 2017, 1:07 a.m. UTC
Build tools like Make, gcc or binutils support localized output
or unicode encoded output dependent on the default system locale.
This is not useful for buildman, where we want reproducible
warning or error messages or where the output of binutils is
further processed.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---

 tools/buildman/toolchain.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Simon Glass June 9, 2017, 12:01 a.m. UTC | #1
Build tools like Make, gcc or binutils support localized output
or unicode encoded output dependent on the default system locale.
This is not useful for buildman, where we want reproducible
warning or error messages or where the output of binutils is
further processed.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---

 tools/buildman/toolchain.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 5cf97ac814..2076323d5d 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -144,7 +144,9 @@  class Toolchain:
         """Returns an environment for using the toolchain.
 
         Thie takes the current environment and adds CROSS_COMPILE so that
-        the tool chain will operate correctly.
+        the tool chain will operate correctly. This also disables localized
+        output and possibly unicode encoded output of all build tools by
+        adding LC_ALL=C.
 
         Args:
             full_path: Return the full path in CROSS_COMPILE and don't set
@@ -159,6 +161,8 @@  class Toolchain:
             env['CROSS_COMPILE'] = wrapper + self.cross
             env['PATH'] = self.path + ':' + env['PATH']
 
+        env['LC_ALL'] = 'C'
+
         return env