1 |
vapier 11/11/29 20:10:03 |
2 |
|
3 |
Modified: toolchain-binutils.eclass |
4 |
Log: |
5 |
add USE=zlib support with newer binutils |
6 |
|
7 |
Revision Changes Path |
8 |
1.103 eclass/toolchain-binutils.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.103&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.103&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?r1=1.102&r2=1.103 |
13 |
|
14 |
Index: toolchain-binutils.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v |
17 |
retrieving revision 1.102 |
18 |
retrieving revision 1.103 |
19 |
diff -u -r1.102 -r1.103 |
20 |
--- toolchain-binutils.eclass 28 Oct 2011 07:58:38 -0000 1.102 |
21 |
+++ toolchain-binutils.eclass 29 Nov 2011 20:10:03 -0000 1.103 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2010 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.102 2011/10/28 07:58:38 vapier Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.103 2011/11/29 20:10:03 vapier Exp $ |
27 |
# |
28 |
# Maintainer: Toolchain Ninjas <toolchain@g.o> |
29 |
# |
30 |
@@ -78,6 +78,9 @@ |
31 |
LICENSE="|| ( GPL-2 LGPL-2 )" |
32 |
fi |
33 |
IUSE="nls multitarget multislot static-libs test vanilla" |
34 |
+if version_is_at_least 2.19 ; then |
35 |
+ IUSE+=" zlib" |
36 |
+fi |
37 |
if use multislot ; then |
38 |
SLOT="${CTARGET}-${BVER}" |
39 |
elif is_cross ; then |
40 |
@@ -87,6 +90,7 @@ |
41 |
fi |
42 |
|
43 |
RDEPEND=">=sys-devel/binutils-config-1.9" |
44 |
+in_iuse zlib && RDEPEND+=" zlib? ( sys-libs/zlib )" |
45 |
DEPEND="${RDEPEND} |
46 |
test? ( dev-util/dejagnu ) |
47 |
nls? ( sys-devel/gettext ) |
48 |
@@ -199,6 +203,7 @@ |
49 |
|
50 |
cd "${MY_BUILDDIR}" |
51 |
set -- |
52 |
+ |
53 |
# enable gold if available (installed as ld.gold) |
54 |
if grep -q 'enable-gold=default' "${S}"/configure ; then |
55 |
set -- "$@" --enable-gold |
56 |
@@ -211,16 +216,26 @@ |
57 |
if grep -q -e '--enable-plugins' "${S}"/ld/configure ; then |
58 |
set -- "$@" --enable-plugins |
59 |
fi |
60 |
+ |
61 |
use nls \ |
62 |
&& set -- "$@" --without-included-gettext \ |
63 |
|| set -- "$@" --disable-nls |
64 |
+ |
65 |
+ if in_iuse zlib ; then |
66 |
+ # older versions did not have an explicit configure flag |
67 |
+ export ac_cv_search_zlibVersion=$(usex zlib) |
68 |
+ set -- "$@" $(use_with zlib) |
69 |
+ fi |
70 |
+ |
71 |
use multitarget && set -- "$@" --enable-targets=all |
72 |
[[ -n ${CBUILD} ]] && set -- "$@" --build=${CBUILD} |
73 |
is_cross && set -- "$@" --with-sysroot=/usr/${CTARGET} |
74 |
+ |
75 |
# glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ |
76 |
# on everyone in alpha (for now), we'll just enable it when possible |
77 |
has_version ">=${CATEGORY}/glibc-2.5" && set -- "$@" --enable-secureplt |
78 |
has_version ">=sys-libs/glibc-2.5" && set -- "$@" --enable-secureplt |
79 |
+ |
80 |
set -- "$@" \ |
81 |
--prefix=/usr \ |
82 |
--host=${CHOST} \ |