U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/2] Fix unicode handling in buildman
Date: Thu,  8 Jun 2017 03:07:07 +0200	[thread overview]
Message-ID: <20170608010709.28197-1-daniel.schwierzeck@gmail.com> (raw)
In-Reply-To: <20170607121901.16873-1-daniel.schwierzeck@gmail.com>


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(-)

-- 
2.13.0

  parent reply	other threads:[~2017-06-08  1:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 13:40 [U-Boot] [PATCH] buildman: Translate more strings to latin-1 Daniel Schwierzeck
2017-06-01 13:21 ` Simon Glass
2017-06-02  9:18   ` Daniel Schwierzeck
2017-06-02 13:21     ` Tom Rini
2017-06-07 11:55       ` Simon Glass
2017-06-07 12:07         ` Daniel Schwierzeck
2017-06-07 12:19 ` [U-Boot] [PATCH v2] buildman: Translate binutils output to UTF-8 Daniel Schwierzeck
2017-06-07 15:52   ` Simon Glass
2017-06-07 16:03     ` Daniel Schwierzeck
2017-06-09 12:27       ` Simon Glass
2017-06-09 12:43         ` Daniel Schwierzeck
2017-06-08  1:07   ` Daniel Schwierzeck [this message]
2017-06-08  1:07     ` [U-Boot] [PATCH 1/2] buildman: disable localized and unicode output of all build tools Daniel Schwierzeck
2017-06-09  0:01       ` sjg at google.com
2017-06-08  1:07     ` [U-Boot] [PATCH 2/2] buildman: properly translate strings for log and err files to ASCII Daniel Schwierzeck
2017-06-09  0:01       ` sjg at google.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170608010709.28197-1-daniel.schwierzeck@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox