Created attachment 858223 [details] emerge --info On a x86 system, upgrading gcc from 11 to 12 fails: {standard input}: Assembler messages: {standard input}:1385952: Warning: end of file not at end of a line; newline inserted {standard input}:1386553: Error: bad register name `%ea' {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive xg++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[3]: *** [Makefile:1145: insn-emit.o] Error 1 make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-12.2.1_p20230121-r1/work/build/gcc' make[3]: *** Waiting for unfinished jobs.... I found bug 35043 where the lack of memory was the reason for a similar problem. My system has 1 GB memory and 2 GB swap - is it enough?
Created attachment 858225 [details] build.log (gzip)
Created attachment 858227 [details] emerge -pqv output
Created attachment 858229 [details] ebuild environment
I'd take a look at dmesg and see if there are out-of-memory errors.
You can try dropping -pipe from *FLAGS and also consider adding -Wl,--no-keep-memory to LDFLAGS.
dmesg had said: [26614583.403484] Out of memory: Kill process 2097 (cc1plus) score 351 or sacrifice child [26614583.403487] Killed process 2097 (cc1plus) total-vm:1128988kB, anon-rss:483704kB, file-rss:2184kB, shmem-rss:0kB Removing -pipe finally did the job. Thanks a lot! (Wish for the future: A portage error message similar to "Not enough memory" instead of "Bad register name %ea" - then I would have got it).