summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Loeser <halcy0n@gentoo.org>2010-04-24 23:53:14 +0000
committerMark Loeser <halcy0n@gentoo.org>2010-04-24 23:53:14 +0000
commit75e4e2ea88be934ebf587b1aeaf06866238e0e26 (patch)
tree227e7d7cbd612819e9b8bb2fcd1d20342e862512 /eclass/toolchain.eclass
parentAdd mask for testing gcc-4.5.x (diff)
downloadgentoo-2-75e4e2ea88be934ebf587b1aeaf06866238e0e26.tar.gz
gentoo-2-75e4e2ea88be934ebf587b1aeaf06866238e0e26.tar.bz2
gentoo-2-75e4e2ea88be934ebf587b1aeaf06866238e0e26.zip
Add in lto use flag, and cleaning up of python scripts for gcc-4.5
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass17
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5d5c9add34e5..5c2d2c2315ba 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# 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>
@@ -159,6 +159,7 @@ else
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
@@ -1351,6 +1352,11 @@ gcc_do_configure() {
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"
@@ -1913,6 +1919,15 @@ gcc-compiler_src_install() {
# 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() {