| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2010 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.88 2009/12/24 13:16:16 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.89 2010/01/28 00:25:22 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> |
5 | # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # We install binutils into CTARGET-VERSION specific directories. This lets |
7 | # We install binutils into CTARGET-VERSION specific directories. This lets |
| 8 | # us easily merge multiple versions for multiple targets (if we wish) and |
8 | # us easily merge multiple versions for multiple targets (if we wish) and |
| … | |
… | |
| 73 | if version_is_at_least 2.18 ; then |
73 | if version_is_at_least 2.18 ; then |
| 74 | LICENSE="|| ( GPL-3 LGPL-3 )" |
74 | LICENSE="|| ( GPL-3 LGPL-3 )" |
| 75 | else |
75 | else |
| 76 | LICENSE="|| ( GPL-2 LGPL-2 )" |
76 | LICENSE="|| ( GPL-2 LGPL-2 )" |
| 77 | fi |
77 | fi |
| 78 | IUSE="gold nls multitarget multislot test vanilla" |
78 | IUSE="nls multitarget multislot test vanilla" |
| 79 | if use multislot ; then |
79 | if use multislot ; then |
| 80 | SLOT="${CTARGET}-${BVER}" |
80 | SLOT="${CTARGET}-${BVER}" |
| 81 | elif is_cross ; then |
81 | elif is_cross ; then |
| 82 | SLOT="${CTARGET}" |
82 | SLOT="${CTARGET}" |
| 83 | else |
83 | else |
| … | |
… | |
| 193 | done |
193 | done |
| 194 | echo |
194 | echo |
| 195 | |
195 | |
| 196 | cd "${MY_BUILDDIR}" |
196 | cd "${MY_BUILDDIR}" |
| 197 | local myconf="" |
197 | local myconf="" |
| 198 | # new versions allow gold and ld while older allowed only one |
198 | # new versions allow gold and ld; screw older versions |
| 199 | if grep -q 'gold.*yes,both' "${S}"/configure ; then |
199 | if grep -q 'enable-gold=both/bfd' "${S}"/configure ; then |
| 200 | myconf="${myconf} $(use_enable gold gold both) --enable-linker=bfd" |
|
|
| 201 | else |
|
|
| 202 | myconf="${myconf} $(use_enable gold)" |
200 | myconf="${myconf} --enable-gold=both/bfd" |
| 203 | fi |
201 | fi |
| 204 | use nls \ |
202 | use nls \ |
| 205 | && myconf="${myconf} --without-included-gettext" \ |
203 | && myconf="${myconf} --without-included-gettext" \ |
| 206 | || myconf="${myconf} --disable-nls" |
204 | || myconf="${myconf} --disable-nls" |
| 207 | use multitarget && myconf="${myconf} --enable-targets=all" |
205 | use multitarget && myconf="${myconf} --enable-targets=all" |