From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Schwierzeck Date: Thu, 8 Jun 2017 03:07:07 +0200 Subject: [U-Boot] [PATCH 0/2] Fix unicode handling in buildman In-Reply-To: <20170607121901.16873-1-daniel.schwierzeck@gmail.com> References: <20170607121901.16873-1-daniel.schwierzeck@gmail.com> Message-ID: <20170608010709.28197-1-daniel.schwierzeck@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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[] = "aaacc"; 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(-) -- 2.13.0