[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1067243: openssh: please build without -fzero-call-used-regs=used on m68k



Source: openssh
Version: 1:9.7p1-2
Severity: important
Justification: FTBFS on d-ports arch
Tags: ftbfs
X-Debbugs-Cc: tg@mirbsd.de, debian-68k@lists.debian.org

On m68k, gcc-13 currently ICEs when -fzero-call-used-regs=used is
used (see #1066891) in moduli.c, packet.c, etc. but the configury
detects it and so it gets used. The upstream GCC bug comments say
there is no plan to backport the possible fix to releases, but it
has a short reproducer by doko:


$ cat moduli.i
int snprintf_eta;
double snprintf_time_per_line;
int snprintf(char *, int, char *, ...) {
  snprintf_eta = snprintf_time_per_line;
}

$ m68k-linux-gnu-gcc -c -O2 -fzero-call-used-regs=used -fPIE moduli.i
during RTL pass: zero_call_used_regs
moduli.i: In function ‘snprintf’:
moduli.i:5:1: internal compiler error: in change_address_1, at emit-rtl.cc:2287


Maybe this could be used in the configure script?

I can confirm that appending…

int snprintf_eta;
double snprintf_time_per_line;
int snprintf(char *str, size_t size, const char *format, ...) {
  snprintf_eta = snprintf_time_per_line;
}

… (lightly changed from the above) to the program from
m4/openssh.m4 OSSH_COMPILER_FLAG_TEST_PROGRAM fails with:

(pbuild-15711)root@ara2:/tmp# gcc -O2 -fPIE -fno-strict-aliasing -fzero-call-used-regs=used t.c
during RTL pass: zero_call_used_regs
t.c: In function 'snprintf':
t.c:51:1: internal compiler error: in change_address_1, at emit-rtl.cc:2287
   51 | }
      | ^
[…]


Alternatively, just hardcode disabling this flag on m68k for now,
which we’ll eventually have to revert once GCC is on a fixed release
(14 probably).

Thanks in advance!


Reply to: