Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Raphaël Mélotte via buildroot" <buildroot@buildroot.org>
To: buildroot@buildroot.org, Yegor Yefremov <yegorslists@googlemail.com>
Cc: "Raphaël Mélotte" <raphael.melotte@mind.be>
Subject: Re: [Buildroot] [PATCH 2/2] package/openssh: fix build on MIPS before R6 at -O0
Date: Fri, 30 Oct 2026 16:29:50 +0100	[thread overview]
Message-ID: <20261030152952.1908157-1-raphael.melotte@mind.be> (raw)
In-Reply-To: <20261024215009.1004860-2-yegorslists@googlemail.com>

In reply of:
> openssh fails to build on MIPS64 (n32/n64 ABI) before R6 with
> BR2_OPTIMIZE_0:
> 
>   during RTL pass: zero_call_used_regs
>   channels.c: In function 'channel_set_xtype':
>   channels.c:437:1: internal compiler error: in int_mode_for_mode, at stor-layout.cc:408
> 
> Since version 9.6p1, openssh builds with -fzero-call-used-regs=used if
> the compiler supports it. On MIPS before R6, gcc rejects this option or
> ICEs on functions using the hi/lo registers (gcc bug 104820). The
> configure check usually catches this, but at -O0 its test program
> builds fine with n32/n64, so the option ends up being used.
> 
> Disable -fzero-call-used-regs on MIPS before R6, through the configure
> cache variable already used for powerpc64le. This doesn't lose anything,
> as the option is never usable there.
> 
> This issue has been present since commit 3c047ea463e2
> ("package/openssh: security bump to version 9.6p1"), which switched
> from -fzero-call-used-regs=all (always rejected by the configure check
> on MIPS before R6) to -fzero-call-used-regs=used. It therefore affects
> 2024.02 and later, including all maintained branches. The cache
> variable only exists since openssh 10.1, so for branches with an older
> openssh, --without-hardening would be needed instead.
> 
> Fixes:
> https://autobuild.buildroot.org/results/68d260341341afb0dfb7244f641f5196df3649a8
> 
> Fixes: 3c047ea463e27ceaafde76d64406862c3322daa0 ("package/openssh: security bump to version 9.6p1")
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied to 2025.02.x, 2026.08.x. Thanks

> ---
>  package/openssh/openssh.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
> index 6808db9962..a0cd3168e0 100644
> --- a/package/openssh/openssh.mk
> +++ b/package/openssh/openssh.mk
> @@ -36,7 +36,9 @@ define OPENSSH_PERMISSIONS
>  	/var/empty d 755 root root - - - - -
>  endef
>  
> -ifeq ($(BR2_powerpc64le),y)
> +# -fzero-call-used-regs=used is not supported on powerpc64le and makes
> +# gcc ICE on MIPS before R6
> +ifneq ($(BR2_powerpc64le)$(BR2_TOOLCHAIN_HAS_GCC_BUG_104820),)
>  OPENSSH_CONF_ENV += ossh_cv_cflag__fzero_call_used_regs_used=no
>  endif
>  
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-10-30 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24 21:50 [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_104820 Yegor Yefremov
2026-10-24 21:50 ` [Buildroot] [PATCH 2/2] package/openssh: fix build on MIPS before R6 at -O0 Yegor Yefremov
2026-10-30 15:29   ` Raphaël Mélotte via buildroot [this message]
2026-10-25 20:49 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_104820 Thomas Petazzoni via buildroot
2026-10-30 15:29 ` 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=20261030152952.1908157-1-raphael.melotte@mind.be \
    --to=buildroot@buildroot.org \
    --cc=raphael.melotte@mind.be \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox