https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108682
--- Comment #1 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- Merging libffi is a big change and not suitable for stage 3 IMO. Can we can apply the LoongArch patch locally instead? It will not affect other targets and even if does not work perfectly on LoongArch we don't lose anything.