Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
Date: Mon, 7 Aug 2023 08:15:38 +0200	[thread overview]
Message-ID: <ZNCMCpph+op/jEC/@waldemar-brodkorb.de> (raw)
In-Reply-To: <e33edaae-e04b-c9fd-29f1-8bd6954d2d74@benettiengineering.com>

Hi Giulio,
Giulio Benetti wrote,

> On 06/08/23 20:39, Giulio Benetti wrote:
> > Hi Waldemar,
> > 
> > On 06/08/23 19:37, Waldemar Brodkorb wrote:
> > > Following ICE occurs:
> > > (cd openbsd-compat && /home/autobuild/make/make)
> > > make[2]: Entering directory '/home/autobuild/autobuild/instance-10/output-1/build/openssh-9.3p1/openbsd-compat'
> > > /home/autobuild/autobuild/instance-10/output-1/host/bin/m68k-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3 -g0  -pipe -Wno-error=format-truncation -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -Wimplicit-fallthrough -Wmisleading-indentation -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fzero-call-used-regs=all -fno-builtin-memset   -fPIC -I. -I.. -I. -I./.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -DHAVE_CONFIG_H -c bsd-asprintf.c
> > > /home/autobuild/autobuild/instance-10/output-1/host/bin/m68k-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3 -g0  -pipe -Wno-error=format-truncation -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -Wimplicit-fallthrough -Wmisleading-indentation -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fzero-call-used-regs=all -fno-builtin-memset   -fPIC -I. -I.. -I. -I./.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -DHAVE_CONFIG_H -c bsd-closefrom.c
> > > during RTL pass: zero_call_used_regs
> > > bsd-closefrom.c: In function 'closefrom':
> > > bsd-closefrom.c:151:1: internal compiler error: in change_address_1,
> > > at emit-rtl.c:2275
> > >    151 | }
> > >        | ^
> > > 0x7fa76f4bad09 __libc_start_main
> > >     ../csu/libc-start.c:308
> > > Please submit a full bug report,
> > > with preprocessed source if appropriate.
> > > Please include the complete backtrace with any bug report.
> > > See <http://bugs.buildroot.net/> for instructions.
> > > make[2]: *** [Makefile:106: bsd-closefrom.o] Error 1
> > > 
> > > Fixes following autobuild failure:
> > > http://autobuild.buildroot.net/results/d29/d29c662e41d8969e6a8aa24870e728bcc7050563/
> > > 
> > > Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> > > ---
> > >   package/openssh/openssh.mk | 5 +++++
> > >   1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
> > > index e14d752290..65f02088a0 100644
> > > --- a/package/openssh/openssh.mk
> > > +++ b/package/openssh/openssh.mk
> > > @@ -35,6 +35,11 @@ define OPENSSH_PERMISSIONS
> > >       /var/empty d 755 root root - - - - -
> > >   endef
> > > +# workaround gcc ICE with 11.x/12.x and 13.x
> > > +ifeq ($(BR2_m68k),y)
> > > +OPENSSH_CONF_OPTS += --without-hardening
> > > +endif
> > > +
> > 
> > This deserves a gcc bug that I've added with this patch:
> > https://patchwork.ozlabs.org/project/buildroot/patch/20230806183738.257006-1-giulio.benetti@benettiengineering.com/
> > 
> > this is the bug:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80786
> > 
> > and for consistency in Buildroot we tend to work-around gcc/binutils
> > bugs, whenever possible, by lowering the optimization to -O0, so I ask
> > you to send a patch doing this.
> > You can take as a model this commit for the commit log too:
> > https://gitlab.com/buildroot.org/buildroot/-/commit/803247337d35643afdca9718c4616500b9930f2d
> 
> By the way I've given a try with -O0 workaround but it still shows gcc
> ICE with gcc 13.2.0. So at this point I would disable hardening like
> you've proposed but by checking for BR2_TOOLCHAIN_HAS_GCC_BUG_80786
> instead of BR2_m68k. Can you provide such patch pointing that it
> depends on mine on a cover letter or after the 3 dashes?

Are you sure it is the same gcc bug we seeing here. I would say it
has something to do with -fzero-call-used-regs=all instead.

best regards
 Waldemar
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-08-07  6:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 17:37 [Buildroot] [PATCH] package/openssh: fix compile issue for m68k Waldemar Brodkorb
2023-08-06 18:39 ` Giulio Benetti
2023-08-06 21:21   ` Giulio Benetti
2023-08-07  6:15     ` Waldemar Brodkorb [this message]
2023-08-07  9:14       ` Giulio Benetti
2023-08-07 11:45         ` Waldemar Brodkorb
2023-08-07 12:12           ` Giulio Benetti

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=ZNCMCpph+op/jEC/@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.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