Dominik Vogt and I are trying to get upstream libffi merged back to gcc, so that we can leverage better support for libgo.
I've done a heavy handed merge into a branch (likely not the final form), and I'd like it to see wider testing. Especially Darwin, which is known to be broken upstream. But I'm hoping that Darwin can be fixed with a limited amount of ifdefs, rather than the wholesale code duplication that existed previously. Please check out git://gcc.gnu.org/git/gcc.git rth/ffi and --enable-languages=all,go to test libffi usage in both java and go. r~