https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84484
--- Comment #2 from Andreas Schwab <sch...@linux-m68k.org> --- <https://build.opensuse.org/package/view_file/home:Andreas_Schwab:riscv:gcc8/gcc8/go-riscv.patch?expand=1> contains a preliminary patch to add support for riscv, you also need <https://build.opensuse.org/package/view_file/home:Andreas_Schwab:riscv:gcc8/gcc8/libffi-riscv.patch?expand=1> for libffi.