Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
@ 2023-08-06 17:37 Waldemar Brodkorb
  2023-08-06 18:39 ` Giulio Benetti
  0 siblings, 1 reply; 7+ messages in thread
From: Waldemar Brodkorb @ 2023-08-06 17:37 UTC (permalink / raw)
  To: buildroot

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
+
 ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
 OPENSSH_CONF_OPTS += --without-pie
 endif
-- 
2.39.2

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Giulio Benetti @ 2023-08-06 18:39 UTC (permalink / raw)
  To: Waldemar Brodkorb, buildroot

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

Thank you
Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
  2023-08-06 18:39 ` Giulio Benetti
@ 2023-08-06 21:21   ` Giulio Benetti
  2023-08-07  6:15     ` Waldemar Brodkorb
  0 siblings, 1 reply; 7+ messages in thread
From: Giulio Benetti @ 2023-08-06 21:21 UTC (permalink / raw)
  To: Waldemar Brodkorb, buildroot

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?

Thank you!
Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
  2023-08-06 21:21   ` Giulio Benetti
@ 2023-08-07  6:15     ` Waldemar Brodkorb
  2023-08-07  9:14       ` Giulio Benetti
  0 siblings, 1 reply; 7+ messages in thread
From: Waldemar Brodkorb @ 2023-08-07  6:15 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: buildroot

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
  2023-08-07  6:15     ` Waldemar Brodkorb
@ 2023-08-07  9:14       ` Giulio Benetti
  2023-08-07 11:45         ` Waldemar Brodkorb
  0 siblings, 1 reply; 7+ messages in thread
From: Giulio Benetti @ 2023-08-07  9:14 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot

Hi Waldemar,

On 07/08/23 08:15, Waldemar Brodkorb wrote:
> 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.

Oh, I think you are right, so can you please submit a new gcc bug for this?

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas

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

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
  2023-08-07  9:14       ` Giulio Benetti
@ 2023-08-07 11:45         ` Waldemar Brodkorb
  2023-08-07 12:12           ` Giulio Benetti
  0 siblings, 1 reply; 7+ messages in thread
From: Waldemar Brodkorb @ 2023-08-07 11:45 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: buildroot

Hi Giulio,
Giulio Benetti wrote,

> Hi Waldemar,
> 
> On 07/08/23 08:15, Waldemar Brodkorb wrote:
> > 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.
> 
> Oh, I think you are right, so can you please submit a new gcc bug for this?

I opened a bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110934

How to proceed now? Is it possible to append the CFLAGS
-fzero-call-used-regs=used somehow?

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] [PATCH] package/openssh: fix compile issue for m68k
  2023-08-07 11:45         ` Waldemar Brodkorb
@ 2023-08-07 12:12           ` Giulio Benetti
  0 siblings, 0 replies; 7+ messages in thread
From: Giulio Benetti @ 2023-08-07 12:12 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot


[-- Attachment #1.1.1: Type: text/html, Size: 40200 bytes --]

[-- Attachment #1.1.2: logo.png --]
[-- Type: image/png, Size: 117499 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-08-07 12:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-08-07  9:14       ` Giulio Benetti
2023-08-07 11:45         ` Waldemar Brodkorb
2023-08-07 12:12           ` Giulio Benetti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox