Created attachment 880025 [details] openssh-9.6_p1 build.log While building net-misc/openssh-9.6_p1 on m68k I ran into: m68k-unknown-linux-musl-cc -pipe -O2 -pipe -Wno-error=format-truncation -Wall -Wextra -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-parameter -Wno-unused-result -Wimplicit-fallthrough -Wmisleading-indentation -fno-strict-aliasing -ftrapv -fzero-call-used-regs=used -ftrivial-auto-var-init=zero -fno-builtin-memset -fstack-protector-strong -fPIE -I. -I. -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE -DOPENSSL_API_COMPAT=0x10100000L -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/misc/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/misc/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/misc/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/lib/misc/ssh-pkcs11-helper\" -D_PATH_SSH_SK_HELPER=\"/usr/lib/misc/ssh-sk-helper\" -D_PATH_SSH_PIDDIR=\"/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c clientloop.c -o clientloop.o during RTL pass: zero_call_used_regs clientloop.c: In function 'client_loop': clientloop.c:1699:1: internal compiler error: in change_address_1, at emit-rtl.cc:2287 1699 | } | ^ 0x80ffe5ff internal_error(char const*, ...) ???:0 0x8016fca3 fancy_abort(char const*, int, char const*) ???:0 0x803a3d03 replace_equiv_address(rtx_def*, rtx_def*, bool) ???:0 0x803d39ed emit_move_insn(rtx_def*, rtx_def*) ???:0 0x807274a9 default_zero_call_used_regs(unsigned long) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. make: *** [Makefile:195: clientloop.o] Error 1 To reproduce: 1. Use any m68k stage3 2. Run echo 'int t() {}' | gcc -nostdinc -fzero-call-used-regs=all -x c -
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b22d07f89b16ac3400e45077702ac4c4492e5a4 commit 0b22d07f89b16ac3400e45077702ac4c4492e5a4 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-12-20 07:12:26 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-12-20 07:14:16 +0000 net-misc/openssh: disable problematic -fzero-call-used-regs=* --with-hardening adds the following in addition to flags we already set in our toolchain: * -ftrapv (which is broken with GCC anyway), * -ftrivial-auto-var-init=zero (which is nice, but not the end of the world to not have) * -fzero-call-used-regs=used (history of miscompilations with Clang (bug #872548), ICEs on m68k (bug #920350, gcc PR113086, gcc PR104820, gcc PR104817, gcc PR110934)). Furthermore, OSSH_CHECK_CFLAG_COMPILE does not use AC_CACHE_CHECK, so we cannot just disable -fzero-call-used-regs=used. Therefore, just pass --without-hardening, given it doesn't negate our already hardened toolchain defaults, and avoids adding flags which are known-broken in both Clang and GCC and haven't been proven reliable. Bug: https://bugs.gentoo.org/872548 Bug: https://bugs.gentoo.org/920350 Bug: https://bugs.gentoo.org/920292 Bug: https://gcc.gnu.org/PR113086 Bug: https://gcc.gnu.org/PR104820 Bug: https://gcc.gnu.org/PR104817 Bug: https://gcc.gnu.org/PR110934 Signed-off-by: Sam James <sam@gentoo.org> net-misc/openssh/openssh-9.6_p1-r1.ebuild | 396 ++++++++++++++++++++++++++++++ 1 file changed, 396 insertions(+)
Fix is https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=f1dea0fed946ba40bd6bbe40ad1386aa9303418c. We can probably backport it if it applies cleanly to 13 & works. Try it on 13?