Index: toolchain.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
retrieving revision 1.517
diff -u -r1.517 toolchain.eclass
--- toolchain.eclass	20 Feb 2012 07:18:47 -0000	1.517
+++ toolchain.eclass	26 Feb 2012 10:50:33 -0000
@@ -91,7 +91,7 @@
 	[[ -n ${SPECS_VER} ]] && IUSE+=" nossp"
 
 	if tc_version_is_at_least 3 ; then
-		IUSE+=" bootstrap doc gcj gtk hardened libffi multilib objc"
+		IUSE+=" bootstrap doc gcj gtk hardened multilib objc"
 
 		tc_version_is_at_least "4.0" && IUSE+=" objc-gc mudflap"
 		tc_version_is_at_least "4.1" && IUSE+=" libssp objc++"
@@ -722,14 +722,6 @@
 
 	use hardened && make_gcc_hard
 
-	if is_libffi ; then
-		# move the libffi target out of gcj and into all
-		sed -i \
-			-e '/^libgcj=/s:target-libffi::' \
-			-e '/^target_lib/s:=":="target-libffi :' \
-			"${S}"/configure || die
-	fi
-
 	# install the libstdc++ python into the right location
 	# http://gcc.gnu.org/PR51368
 	if tc_version_is_at_least 4.5 ; then
@@ -780,6 +772,10 @@
 		do_gcc_rename_java_bins
 	fi
 
+	# Prevent libffi from being installed
+	sed -i -e 's/\(install.*:\) install-.*recursive/\1/' "${S}"/libffi/Makefile.in
+	sed -i -e 's/\(install-data-am:\).*/\1/' "${S}"/libffi/include/Makefile.in
+
 	# Fixup libtool to correctly generate .la files with portage
 	cd "${S}"
 	elibtoolize --portage --shallow --no-uclibc
@@ -1498,17 +1494,6 @@
 		fi
 	done
 
-	# I do not know if this will break gcj stuff, so I'll only do it for
-	#	objc for now; basically "ffi.h" is the correct file to include,
-	#	but it gets installed in .../GCCVER/include and yet it does
-	#	"#include <ffitarget.h>" which (correctly, as it's an "extra" file)
-	#	is installed in .../GCCVER/include/libffi; the following fixes
-	#	ffi.'s include of ffitarget.h - Armando Di Cianno <fafhrd@gentoo.org>
-	if [[ -d ${D}${LIBPATH}/include/libffi ]] ; then
-		mv -i "${D}"${LIBPATH}/include/libffi/* "${D}"${LIBPATH}/include || die
-		rm -r "${D}"${LIBPATH}/include/libffi || die
-	fi
-
 	# Now do the fun stripping stuff
 	env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}"
 	env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}"
@@ -2009,10 +1994,6 @@
 	use cxx && use_if_iuse go
 }
 
-is_libffi() {
-	use_if_iuse libffi
-}
-
 is_objc() {
 	gcc-lang-supported objc || return 1
 	use_if_iuse objc