Skip to content

Fix unicode handling in buildman

Daniel Schwierzeck u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2buildman: disable localized and unicode output of all build toolstools/buildman/toolchain.py+5 -11 reply
2/2buildman: properly translate strings for log and err files to ASCIItools/buildman/builderthread.py+4 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/2] Fix unicode handling in buildman

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

arch/arm/config.mk +1 -1
@@ -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

arch/sandbox/cpu/os.c +1 -0
@@ -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(-)
Signature · 1 line
2.13.0