Created attachment 22894 [details] libffi multilib support fix for MingW64 Then multilib is enabled for toolchain(--enable-multilib) libffi fails to build for alternative(secondary) target. The issue caused by libffi's configury system only handling the main host/target without any respect to multilib. For x86_64-w64-mingw32 i've forced to manually import files from libffi 3.0.10-cvs into libffi/src/x86/ from GCC tree but this is out of scope of current issue. This issue is global for many targets. I've made a patch fixing this issue for i686-*-mingw32,x86_64-*-mingw32 targets with multilib configuration.