https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109562
Bug ID: 109562 Summary: Failed to build native GCC 12.2.0 on RISC-V64 linux machine Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: winterjasmine1 at hotmail dot com Target Milestone: --- Created attachment 54885 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54885&action=edit error log when building GCC 12.2.0 natively on RISC-V linux machine Failed to build native GCC 12.2.0 on RISC-V64 linux machine. Steps: ``` $sudo apt-get install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev $ cd gcc-12.2.0 $ contrib/download_prerequisites $ mkdir build && cd build $ ../configure --enable-languages=c,c++,fortran --prefix=$HOME/opt/gcc-12.2.0 --disable-multilib $ make -j4 ``` error info: ``` /usr/include/stdio.h:592:14: error: old-style parameter declarations in prototyped function definition 592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | ^~~~~ ../../../libgcc/libgcc2.c:2457: error: expected ‘{’ at end of input ../../../libgcc/libgcc2.c:2457: warning: control reaches end of non-void function [-Wreturn-type] make[3]: *** [Makefile:501: _ashrdi3.o] Error 1 ``` The full error log is attached.