summaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2017-06-10 18:01:22 -0400
committerTom Rini <[email protected]>2017-06-10 18:01:22 -0400
commit8cb3ce64f936f5dedbcfc1935c5caf31bb682474 (patch)
treebc6cbbacd344ccdac327b4bb7337aa316ad000e0 /tools/buildman
parent4bdb49a7487d1c46c04e3da3f1f370cde1566aea (diff)
parent9620d87259572ef21f0df60988d9a932ca673779 (diff)
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'tools/buildman')
-rw-r--r--tools/buildman/builder.py2
-rw-r--r--tools/buildman/builderthread.py6
-rw-r--r--tools/buildman/toolchain.py6
3 files changed, 10 insertions, 4 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index b0ea57ebb4a..acb0810457e 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -847,7 +847,7 @@ class Builder:
delta.reverse()
args = [add, -remove, grow, -shrink, up, -down, up - down]
- if max(args) == 0:
+ if max(args) == 0 and min(args) == 0:
return
args = [self.ColourNum(x) for x in args]
indent = ' ' * 15
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index acaf5007f50..9e8ca80c5b5 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -280,13 +280,15 @@ class BuilderThread(threading.Thread):
outfile = os.path.join(build_dir, 'log')
with open(outfile, 'w') as fd:
if result.stdout:
- fd.write(result.stdout.encode('latin-1', 'ignore'))
+ # We don't want unicode characters in log files
+ fd.write(result.stdout.decode('UTF-8').encode('ASCII', 'replace'))
errfile = self.builder.GetErrFile(result.commit_upto,
result.brd.target)
if result.stderr:
with open(errfile, 'w') as fd:
- fd.write(result.stderr.encode('latin-1', 'ignore'))
+ # We don't want unicode characters in log files
+ fd.write(result.stderr.decode('UTF-8').encode('ASCII', 'replace'))
elif os.path.exists(errfile):
os.remove(errfile)
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 5cf97ac8148..2076323d5d3 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