Re: [PATCH] buildman: Differentiate 32-bit and 64-bit LoongArch variants

Simon Glass <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAFLszTjqKd_wK5Dnhzm-TTc7TOvGfcu1pw=_=sJHdrhL=y_+Uw@mail.gmail.com>
Hi Yao,

On 2026-07-31T11:22:29, Yao Zi <[email protected]> wrote:
> buildman: Differentiate 32-bit and 64-bit LoongArch variants
>
> Similar to RISC-V and ARM, 32-bit and 64-bit LoongArch couldn't be
> distinguished solely by CONFIG_SYS_ARCH, but require different
> toolchains if multilib is disabled in compiler, which is the case of
> toolchain provided by kernel.org.

Please use present tense - 'cannot be distinguished'.

>
> Let's override the parsed arch parameter for LoongArch configs based
> on CONFIG_ARCH_LA64 Kconfig symbol.
>
> Signed-off-by: Yao Zi <[email protected]>
>
> tools/buildman/boards.py | 11 +++++++++++
>  1 file changed, 11 insertions(+)

> diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py
> @@ -309,6 +309,17 @@ class KconfigScanner:
>              else:
>                  params['arch'] = 'riscv64'
>
> +        # fix-up for loongarch
> +        if params['arch'] == 'loongarch':
> +            try:
> +                value = self._conf.syms.get('ARCH_LA64').str_value
> +            except:
> +                value = ''

The bare except: mirrors the RISC-V block, but pylint flags it -
please use 'except AttributeError:'

With that:

Reviewed-by: Simon Glass <[email protected]>

Regards,
Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.