
This series fixes and optimizes the unicode handling in buildman. It's based on the similar series for patman and applies on top of u-boot-dm/master.
This has been tested by forcibly adding unicode characters in the stdout and stderr stream.
Examples:
The patch
--- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -69,7 +69,7 @@ checkgcc6: @if test "$(call cc-name)" = "gcc" -a \ "$(call cc-version)" -lt "0600"; then \ echo -n '*** Your GCC is older than 6.0 and will not be '; \ - echo 'supported starting in v2018.01.'; \ + echo 'supported starting <C3><B6> in v2018.01.'; \ fi
called with `tools/buildman/buildman -P xilinx_zynqmp_ep` results in stdout:
*** Your GCC is older than 6.0 and will not be supported starting ? in v2018.01.
The patch
--- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -40,6 +40,7 @@ ssize_t os_read(int fd, void *buf, size_t count) ssize_t os_read_no_block(int fd, void *buf, size_t count) { const int flags = fcntl(fd, F_GETFL, 0); + const char dummy[] = "aaa<C3><A4><C3><B6>cc";
fcntl(fd, F_SETFL, flags | O_NONBLOCK); return os_read(fd, buf, count);
called with `tools/buildman/buildman -P sandbox` results in stderr:
arch/sandbox/cpu/os.c: In function ?os_read_no_block?: arch/sandbox/cpu/os.c:43:13: warning: unused variable ?dummy? [-Wunused-variable] const char dummy[] = "aaa??cc"; ^
Daniel Schwierzeck (2): buildman: disable localized and unicode output of all build tools buildman: properly translate strings for log and err files to ASCII
tools/buildman/builderthread.py | 6 ++++-- tools/buildman/toolchain.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-)