The fficonfig.h header file gets installed in a generic location. Unfortunately it has abi-specific values hard coded into it (SIZEOF_LONG and SIZEOF_VOID_P), so on systems with multiple ABIs (like SGI IRIX) whatever you do will be wrong for some architecture -- either you'll end up using the 32-bit values when trying to compile 64-bit programs or vice versa.
I think this is related to bug 7305 which is about libgcj headers but since fficonfig is really part of libgcj these should be handled the same way.
I once gave Anthony Green a reorg of the ffi header files, such that all the arch dependent stuff was split out, and all stuff that's actually private is not installed.
Subject: Bug 11147 CVSROOT: /cvs/gcc Module name: gcc Changes by: andreast@gcc.gnu.org 2003-11-12 18:18:30 Modified files: libffi : ChangeLog Makefile.in configure.in configure libffi/include : Makefile.am Makefile.in libffi/testsuite: Makefile.in Log message: 2003-11-12 Andreas Tobler <a.tobler@schweiz.ch> * configure.in, include/Makefile.am: PR libgcj/11147, install the ffitarget.h header file in a gcc versioned and target dependent place. * configure: Regenerated. * Makefile.in, include/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/ChangeLog.diff?cvsroot=gcc&r1=1.141&r2=1.142 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/Makefile.in.diff?cvsroot=gcc&r1=1.35&r2=1.36 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/configure.in.diff?cvsroot=gcc&r1=1.45&r2=1.46 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/configure.diff?cvsroot=gcc&r1=1.52&r2=1.53 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/include/Makefile.am.diff?cvsroot=gcc&r1=1.2&r2=1.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/include/Makefile.in.diff?cvsroot=gcc&r1=1.11&r2=1.12 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/testsuite/Makefile.in.diff?cvsroot=gcc&r1=1.2&r2=1.3
Fixed for 3.4