xref: /netbsd-src/external/gpl3/gcc/README.gcc12 (revision b2c35e17b976cf7ccd7250c86c6f5e95090ed636)
1$NetBSD: README.gcc12,v 1.25 2024/06/29 23:25:55 mrg Exp $
2
3
4new stuff:
5	libmpx
6	liboffloadmic
7	libvtv
8	libcet
9	libphobos
10	d
11	gfortran
12	libbacktrace: +dwarf5_CFLAGS = $(libbacktrace_TEST_CFLAGS) -gdwarf-5
13	c++tools
14
15todo:
16	- audit all uses of new warning-disable variables and
17	  convert some from -Wno- to -Wno-error=
18
19arch/feature list.
20
21tools:		does build.sh tools work?
22kernels:	does a kernel run?  y (yes), b (builds/ready), p (partially), ? (not ready)
23libgcc:		does libgcc build?
24native-gcc:	does a full mknative-gcc complete?
25sani:		has sanitizer been ported to this CPU again for GCC 12?  b (build) y (works)
26make release:	does build.sh release complete?  (before sanitizer - bs)
27runs:		does the system boot with a full world?
28atf:		does atf run / compare well
29switched:	has port switched?  y (yes), n (no/ready), ? (not ready)
30
31
32architecture	tools	kernels	libgcc	native-gcc/sani	make release	runs	atf	switched
33------------	-----	-------	------	---------------	------------	----	---	--------
34aarch64		y	y	y	y	y[17]	y		y	y	y
35aarch64eb	y	y	y	y	y[17]	y		y	y	y
36alpha		y	y	y	y	b	y		y	y	y
37earmv4		y	b	?	y	?	?		?	?	y
38earmv4eb	y	b	?	y	?	?		?	?	y
39earmv5		y	y	y	y	b	y		y	y	y
40earmv5eb	y	y	y	y	b	y		y	y	y
41earmv5hf	y	b	?	y	?	?		?	?	y
42earmv5hfeb	y	b	?	y	?	?		?	?	y
43earmv6		y	b	?	y	?	?		?	?	y
44earmv6eb	y	b	?	y	?	?		?	?	y
45earmv6hf	y	y	y	y	b	y		y	y	y
46earmv6hfeb	y	y	y	y	b	y		y	y	y
47earmv7		y	b	y	y	?	?		?	?	y
48earmv7eb	y	b	?	y	?	?		?	?	y
49earmv7hf	y	y	y	y	b	y		y	y	y
50earmv7hfeb	y	y	y	y	b	y		y	y	y
51hppa		y	y	y	y	?	y		y	y	y
52i386		y	y	y	y	y[18]	y		y	n[19]	y
53ia64		y	b	y	y	y	y		y[3]	n	y
54m68000		y	y	y	y	b	n		y[14]	?	?
55m68k		y	y	y	y	b	y		y[14]	y[14]	?
56mipseb		y	b	y	y	b	y		y	y	y
57mipsel		y	b	y	y	b	y		y	?	y
58mips64eb	y	b	y	y	b	y		y	y	y
59mips64el	y	b	y	y	b	y		y	?	y
60powerpc		y	y	y	y	y	y		y	y	y
61powerpc64	y	?	?	y	b	b		?	?	y
62sh3eb		y	?	y	y	b	y		?	?	?
63sh3el		y	n[20]	y	y	b	y		n[22]	?	?
64sparc		y	y	y	y	n[21]	y		y	y	y
65sparc64		y	b	y	y	n[16]	y		y	?	y
66vax		y	y	y	y	n[23]	n		n[24,25] ?	?
67x86_64		y	y	y	y	y[13]	y		y	y	y
68riscv32		y	y	y	y	b	y		n[2]	?	y
69riscv64		y	y	y	y	b	y		y	y	y
70------------	-----	-------	------	---------------	------------	----	---
71architecture	tools	kernels	libgcc	native-gcc/sani	make release	runs	atf
72
73[2]: riscv32 kernels are not really implemented yet, not GCC 12 issue.
74[3]: GENERIC.SKI boots just as well as GCC 10.
75[13]: on amd64, with very basic test, lsan, ubsan, and asan work, but tsan crashes at start up:
76      ThreadSanitizer: CHECK failed: tsan_rtl.cpp:149 "((reinterpret_cast<uptr>(this) % 64)) == ((0))" (0x10, 0x0) (tid=21499)
77      ThreadSanitizer:DEADLYSIGNAL
78      ==21499==ERROR: ThreadSanitizer: SEGV on unknown address 0x000000000017 (pc 0x7f7ff4e5e14e bp 0x7f7fffffdbd0 sp 0x7f7fffffdb40 T21499)
79      ==21499==The signal is caused by a READ memory access.
80      ==21499==Hint: address points to the zero page.
81      ThreadSanitizer:DEADLYSIGNAL
82      ThreadSanitizer: nested bug in the same thread, aborting.
83[14]: "dd count=1", "env LC_CTYPE=en_US.UTF-8 locale", and "tests/crypto/libcrypto/h_evp_test evpmd_blake.txt" abort.
84      adding -fno-stack-protector to strsuftoll.c, citrus_module.c, and blake2_prov.c, respectively, works around the problem.
85      -- workarounds commited.
86[16]: sanitizers crash early:
87      Program received signal SIGSEGV, Segmentation fault.
88      (gdb) bt
89      #0  0x000000004064265c in __sanitizer::CheckASLR () at /usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cpp:2181
90      #1  0xffffffffffffc704 in ?? ()
91      Backtrace stopped: previous frame identical to this frame (corrupt stack?)
92      -- some wip patches make this less bad
93[17]: (NOT A REGRESSION) libtsan is newly introduced, which fails with:
94      FATAL: ThreadSanitizer: unexpected memory mapping 0x200100000-0x200101000
95[18]: lib*san is compiled with -march=i586 to ensure required atomic ops are present
96[19]: kernel freezes with garbage parmanently output to console, after lib/libc/sys/t_ptrace_wait:syscall_signal_on_sce fails:
97          syscall_signal_on_sce: [[ 3013.0266693] sorry pid 1847 was killed: orphanes
98          ss
99          ss
100          ss
101          ...
102[20]: kernel needs -O1 for ffs32() and ffs_nodealloccg() for multi-user boot. Even if the whole kernel is built with -O1, it panics during ATF:
103      kernel/t_sysv (92/935): 3 test cases
104          msg: [ 3981.4751382] panic: kernel diagnostic assertion "msghdr->msg_spot >= 0" failed: file "../../../../kern/sysv_msg.c", line 426
105[21]: asan has v7/v8/atomic issues:
106      ld: /usr/lib/libasan.so: undefined reference to `__sync_val_compare_and_swap_8'
107      nm shows some more:
108	U __sync_add_and_fetch_4
109	U __sync_fetch_and_add_4
110	U __sync_lock_test_and_set_4
111	U __sync_val_compare_and_swap_1
112	U __sync_val_compare_and_swap_4
113      liblsan and libubsan are mssing the _4 and _8 versions, too.
114      -- they're not really supported (not my atf) in gcc 10 currently.
115[22]: single-user shell crashes. if userland is built with DBG=-O1, it boots into multi-user mode.
116      however, at least db(3) is broken, by which files are corrupted when edited by vi(1).
117[23]: sanitizers fail to build:
118      sanitizer_flag_parser.h:141:72: error: format '%zx' expects argument of type 'size_t', but argument 4 has type 'unsigned int' [-Werror=format=]
119[24]: (NOT A REGRESSION) c++ exception handling is broken. mechanically applying
120      http://www.execsw.org/netbsd/changeset.cgi?id=20140318T234341Z.c59ac4642e7d4b345f6dc5aa9887e9e1f9aa459a#src/gnu/dist/gcc4/gcc/config/vax/vax.c
121      does not help (with adjustments for gcc 10.5.0, which is broken, too):
122      (gdb) invalid-command
123      [1]   Illegal instruction (core dumped) gdb
124[25]: (maybe not related to [24]) native gcc is broken:
125      simh# cc hello.c
126      during RTL pass: final
127      hello.c: In function 'main':
128      hello.c:9:1: internal compiler error: Segmentation fault
129
130
131CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.
132values:		y (yes), k (kernels only), n (failed), r (running), ? (not attempted), nx (yes, no x11), nk (no kernels available)
133
134CPU		platform list
135---		-------- ----
136		acorn32		cats	epoc32	evbarm-eb	evbarm-el	hpcarm		iyonix		netwinder	shark 		zaurus
137earmv4:		k		k	k	k		k		k		 		k		y
138earm:		 		 	 	nx		nx		 		k		 		 		k
139earmhf:		 		 	 	k		k
140earmv6:		 		 	 	k		k
141earmv6hf:	 		 	 	nx		nx
142earmv7:		 		 	 	k		k
143earmv7hf:	 		 	 	nx		nx
144
145		amiga		atari	cesfic	hp300		luna68k		mac68k		mvme68k		news68k		next68k		sun3	x68k
146m68k:		nx		k	k	k		k		nx		k		k		k		nx 	k
147
148		evbmips		emips		ews4800mips	mipsco		newsmips	sgimips
149mipseb:		k		k		k		k		k		y
150
151		evbmips		algor		arc		cobalt		hpcmips		pmax
152mipsel:		k		k		k		k		k		y
153
154		algor		evbmips		pmax
155mips64eb:	 		y
156mips64el:	k		y		y
157
158		amigappc	bebox	evbppc	ibmnws		macppc		mvmeppc		ofppc		prep		rs6000		sandpoint
159powerpc:	k		k	k	k		y		k		k		k		k		k
160
161		evbppc		macppc		ofppc
162powerpc64:	nk		nk		nk
163
164		dreamcast	evbsh3		hpcsh		landisk		mmeye
165sh3eb:		 		y		 		 		k
166sh3el:		k		y		k		k
167