Re: GCC8 v.s. amiga
John Paul Adrian Glaubitz <[email protected]> Mon, 8 Jun 2020 08:14:05 +0200
| Newsgroups | gmane.os.netbsd.ports.m68k,gmane.os.netbsd.devel.toolchain,gmane.os.netbsd.ports.amiga |
|---|---|
| Message-ID | <[email protected]> |
Hi Rin! Thanks for your detailed answer. On 6/8/20 2:52 AM, Rin Okuyama wrote: > Hi. Sorry for the late reply. Some updates: > > On 2020/06/04 19:06, Rin Okuyama wrote: >> For my Amiga A1200 with 68060, kernel built by GCC8 does not work. >> It randomly crashes, and I could not enter DDB nor even obtain >> backtrace; it suddenly freezes. > > I forgot to note an important information: ``randomly'' here means when > kernel freezes is almost unpredictable. Some time, it crashes just after > exec /sbin/init, but other time, it freezes after survival of 12 hours in > multiuser with heavy load! > > When kern_tc.o is built by GCC7, I've never observed such a freeze. > Uptime exceeds few days at least. > > This is why everything takes a loooong time ;). OK. > On 2020/06/04 19:11, John Paul Adrian Glaubitz wrote: >> Do you have the possibility to test GCC 10? The m68k backend has been >> partially rewritten for version 10 which has fixed some bugs in the >> code generation. > > Yeah, I donated that campaign a little :). Thanks. >> At least on Debian, the kernel built with GCC 10 boots fine on my >> Amiga 4000 and qemu-m68k. > > Unfortunately, GCC10 (and also 9 and 8) crashes by ICE when building our > kernel: > > | # compile A1200/kern_tc.o > | ... > | during RTL pass: expand > | In file included from ../../../../sys/param.h:145, > | from ../../../../kern/kern_tc.c:49: > | ../../../../sys/time.h: In function 'tc_windup': > | ../../../../sys/time.h:113:11: internal compiler error: Segmentation fault > | 113 | bt->frac += x; > | | ^~ > | 0xe76208 crash_signal > | /build/work/gcc-10.1.0/gcc/toplev.c:328 > | Please submit a full bug report, > | ... > > cf.: https://nxr.netbsd.org/xref/src/sys/sys/time.h#113 > > I guess why Linux builds and ours does not is: > > (1) Linux #undef STRICT_ALIGNMENT and friends, but we do not > (2) We #define BIGGEST_ALIGNMENT 64, but Linux does not > > For GCC in our local tree, we worked around for this: > > http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/expr.c#rev1.2 > > | Module Name: src > | Committed By: chs > | Date: Sun Oct 9 21:17:34 UTC 2011 > | > | Modified Files: > | src/external/gpl3/gcc/dist/gcc: expr.c > | > | Log Message: > | in emit_push_insn(), ignore alignment if we don't have a type. > | works around a gcc ICE on m68k. from mrg. > | > | To generate a diff of this commit: > | cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/expr.c > > If this patch applied, GCC10 does build our kernel, but > > (a) Kernel built by GCC8 with kern_tc.o replaced by that with GCC10 > ---> eventually crashes as before > > (b) Entire kernel built by GCC10 > ---> does not boot singleuser Could you please report these issues upstream? Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913