Skip to contentSkip to conversation

package/openssh: fix compile issue for m68k

PATCH In review Waldemar Brodkorb 2 participants 7 messages Aug 6, 2023 – Aug 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/openssh: fix compile issue for m68k

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/

---
 package/openssh/openssh.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/openssh/openssh.mk +5 -0
index e14d752290..65f02088a0 100644
@@ -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
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi Waldemar,

Quoted 31 lines · Waldemar Brodkorb

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/

---
  package/openssh/openssh.mk | 5 +++++
  1 file changed, 5 insertions(+)
package/openssh/openssh.mk +0 -0
index e14d752290..65f02088a0 100644

package/openssh/openssh.mk define OPENSSH_PERMISSIONS · line 42

Quoted 8 lines
package/openssh/openssh.mk +5 -0
@@ -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/[email protected]/

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

Signature · 6 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 45 lines · Giulio Benetti

Hi Waldemar,

Quoted 33 lines · Waldemar Brodkorb

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/

---
  package/openssh/openssh.mk | 5 +++++

  1 file changed, 5 insertions(+)
package/openssh/openssh.mk +0 -0
index e14d752290..65f02088a0 100644
@@ -35,6 +35,11 @@ define OPENSSH_PERMISSIONS

      /var/empty d 755 root root - - - - -
  endef

package/openssh/openssh.mk define OPENSSH_PERMISSIONS · line 42

Quoted 5 lines
package/openssh/openssh.mk +5 -0
+# 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/[email protected]/

Quoted 8 lines

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

Signature · 6 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Hi Giulio,
Giulio Benetti wrote,

Quoted 56 lines · Giulio Benetti
Quoted 46 lines

Hi Waldemar,

Quoted 34 lines · Waldemar Brodkorb

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/

---
  package/openssh/openssh.mk | 5 +++++

  1 file changed, 5 insertions(+)
package/openssh/openssh.mk +0 -0
index e14d752290..65f02088a0 100644
@@ -35,6 +35,11 @@ define OPENSSH_PERMISSIONS

      /var/empty d 755 root root - - - - -
  endef

package/openssh/openssh.mk define OPENSSH_PERMISSIONS · line 42

Quoted 5 lines
package/openssh/openssh.mk +5 -0
+# 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/[email protected]/

Quoted 8 lines

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

Quoted 5 lines

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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

Hi Waldemar,

Quoted 59 lines · Waldemar Brodkorb

Hi Giulio,
Giulio Benetti wrote,

Quoted 56 lines · Giulio Benetti
Quoted 54 lines

Hi Waldemar,

Quoted 32 lines · Waldemar Brodkorb

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/

---
   package/openssh/openssh.mk | 5 +++++
   1 file changed, 5 insertions(+)
package/openssh/openssh.mk +0 -0
index e14d752290..65f02088a0 100644

package/openssh/openssh.mk define OPENSSH_PERMISSIONS · line 41

Quoted 7 lines
package/openssh/openssh.mk +5 -0
@@ -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/[email protected]/

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

Quoted 8 lines
Quoted 5 lines

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

Signature · 2 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
Quoted 6 lines

best regards
Waldemar
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

Hi Giulio,
Giulio Benetti wrote,

Quoted 68 lines

Hi Waldemar,

Quoted 65 lines · Waldemar Brodkorb

Hi Giulio,
Giulio Benetti wrote,

Quoted 61 lines · Giulio Benetti
Quoted 46 lines

Hi Waldemar,

Quoted 32 lines · Waldemar Brodkorb

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/

---
   package/openssh/openssh.mk | 5 +++++
   1 file changed, 5 insertions(+)
package/openssh/openssh.mk +0 -0
index e14d752290..65f02088a0 100644

package/openssh/openssh.mk define OPENSSH_PERMISSIONS · line 41

Quoted 7 lines
package/openssh/openssh.mk +5 -0
@@ -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/[email protected]/

Quoted 8 lines

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?

Quoted 4 lines
Quoted 2 lines

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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot