All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: buildroot@buildroot.org, Sergio Prado <sergio.prado@e-labworks.com>
Subject: Re: [Buildroot] [PATCH] package/wolfssl: fix build on MIPS r6
Date: Sun, 1 Nov 2026 17:23:58 +0100	[thread overview]
Message-ID: <audnmrBROqVImdu7@windsurf> (raw)
In-Reply-To: <20261101102813.2047542-1-yegorslists@googlemail.com>

On Sun, Nov 01, 2026 at 11:28:13AM +0100, Yegor Yefremov via buildroot wrote:
> The MIPS assembly code in wolfcrypt/src/sp_int.c uses the
> multu/dmultu, mflo and mfhi instructions and clobbers the hi/lo
> registers. These were removed in MIPS release 6, so the build fails
> on MIPS64 r6:
> 
>   wolfcrypt/src/sp_int.c:4217:5: error: the register '$hi' cannot be clobbered in 'asm' for the current target
> 
> and on MIPS32 r6:
> 
>   wolfcrypt/src/sp_int.c:4418:5: error: the register '%hi' cannot be clobbered in 'asm' for the current target
> 
> BR2_PACKAGE_WOLFSSL_ASM_SUPPORTS was meant to exclude MIPS64 r6, but
> the mips64/mips64el conditions test BR2_MIPS_CPU_MIPS32R6, which can
> never be set for a 64-bit CPU, and the mips/mipsel condition has no
> r6 exclusion at all. Test BR2_MIPS_CPU_MIPS64R6 for mips64/mips64el
> and BR2_MIPS_CPU_MIPS32R6 for mips/mipsel instead, so assembly is
> disabled on all r6 CPUs.
> 
> Commit d8dc5315eb71 ("package/wolfssl: disable assembly when not
> supported") introduced BR2_PACKAGE_WOLFSSL_ASM_SUPPORTS to fix the
> MIPS64 r6 build, but used the wrong r6 symbol for mips64 and added no
> r6 exclusion for mips, so the issue was never fixed. It therefore
> affects 2023.02 and later, including all maintained branches.
> 
> Fixes:
> https://autobuild.buildroot.org/results/10c901b8c57f6322b127f1b14c78f73dbb7f28b2
> 
> Fixes: d8dc5315eb712eca0a5cbf793a6714a47ab6e57e ("package/wolfssl: disable assembly when not supported")
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied to master, thanks!

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-11-01 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 10:28 [Buildroot] [PATCH] package/wolfssl: fix build on MIPS r6 Yegor Yefremov via buildroot
2026-11-01 16:23 ` Thomas Petazzoni via buildroot [this message]
2026-11-06 16:11 ` Raphaël Mélotte via buildroot

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=audnmrBROqVImdu7@windsurf \
    --to=buildroot@buildroot.org \
    --cc=sergio.prado@e-labworks.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yegorslists@googlemail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.