diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-02-16 22:27:51 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-02-16 22:27:51 +0000 |
commit | 58409d1a3adb68e57174dfaa7ef923e1afdc5a50 (patch) | |
tree | 50ce6656670676e6643b27be9d057063b6b642a5 /eclass/toolchain.eclass | |
parent | Version bump #209123. (diff) | |
download | historical-58409d1a3adb68e57174dfaa7ef923e1afdc5a50.tar.gz historical-58409d1a3adb68e57174dfaa7ef923e1afdc5a50.tar.bz2 historical-58409d1a3adb68e57174dfaa7ef923e1afdc5a50.zip |
add support for USE=libffi #199850
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 2a36ae34cdab..7e05b3948611 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.345 2008/02/05 18:09:58 tgall Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.346 2008/02/16 22:27:51 vapier Exp $ # # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> @@ -144,8 +144,8 @@ else [[ -n ${HTB_VER} ]] && IUSE="${IUSE} boundschecking" [[ -n ${D_VER} ]] && IUSE="${IUSE} d" - if version_is_at_least 3 ; then - IUSE="${IUSE} bootstrap doc gcj gtk hardened multilib objc vanilla" + if tc_version_is_at_least 3 ; then + IUSE="${IUSE} bootstrap doc gcj gtk hardened libffi multilib objc vanilla" # gcc-{nios2,bfin} don't accept these if [[ ${PN} == "gcc" ]] ; then @@ -958,6 +958,14 @@ gcc-compiler_src_unpack() { einfo "updating configuration to build hardened GCC" make_gcc_hard || die "failed to make gcc hard" fi + + 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 } gcc-library_src_unpack() { : @@ -1720,10 +1728,9 @@ gcc-compiler_src_install() { # "#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 is_objc && ! is_gcj ; then - #dosed "s:<ffitarget.h>:<libffi/ffitarget.h>:g" /${LIBPATH}/include/ffi.h - mv "${D}"${LIBPATH}/include/libffi/* "${D}"${LIBPATH}/include - rm -Rf "${D}"${LIBPATH}/include/libffi + 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 fi @@ -2367,6 +2374,12 @@ is_gcj() { use gcj } +is_libffi() { + has libffi ${USE} || return 1 + use build && return 1 + use libffi +} + is_objc() { gcc-lang-supported objc || return 1 use build && return 1 |