# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.423 2010/04/23 18:58:06 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.424 2010/04/24 23:53:14 halcy0n Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
tc_version_is_at_least "4.2" && IUSE="${IUSE} openmp"
tc_version_is_at_least "4.3" && IUSE="${IUSE} fixed-point"
tc_version_is_at_least "4.4" && IUSE="${IUSE} graphite"
+ tc_version_is_at_least "4.5" && IUSE="${IUSE} lto"
fi
fi
tc_version_is_at_least "4.4" && \
confgcc="${confgcc} $(use_with graphite ppl) $(use_with graphite cloog)"
+ # lto support was added in 4.5, which depends upon elfutils. This allows
+ # users to enable that option, and pull in the additional library
+ tc_version_is_at_least "4.5" && \
+ confgcc="${confgcc} $(use_enable lto)"
+
[[ $(tc-is-softfloat) == "yes" ]] && confgcc="${confgcc} --with-float=soft"
# Cpoy the needed minispec for hardened gcc 4
copy_minispecs_gcc_specs
+
+ # Move pretty-printers to gdb datadir to shut ldconfig up
+ gdbdir=/usr/share/gdb/auto-load
+ for module in $(find "${D}" -iname "*-gdb.py" -print); do
+ insinto ${gdbdir}/$(dirname "${module/${D}/}" | \
+ sed -e "s:/lib/:/$(get_libdir)/:g")
+ doins "${module}"
+ rm "${module}"
+ done
}
gcc_slot_java() {