Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: toolchain-binutils.eclass
Date: Wed, 01 Dec 2010 11:45:59
Message-Id: 20101201114550.6CC2820054@flycatcher.gentoo.org
1 vapier 10/12/01 11:45:50
2
3 Modified: toolchain-binutils.eclass
4 Log:
5 switch myconf to `set` to handle spaces in args
6
7 Revision Changes Path
8 1.93 eclass/toolchain-binutils.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.93&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?rev=1.93&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-binutils.eclass?r1=1.92&r2=1.93
13
14 Index: toolchain-binutils.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v
17 retrieving revision 1.92
18 retrieving revision 1.93
19 diff -u -r1.92 -r1.93
20 --- toolchain-binutils.eclass 1 Dec 2010 11:22:11 -0000 1.92
21 +++ toolchain-binutils.eclass 1 Dec 2010 11:45:50 -0000 1.93
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.92 2010/12/01 11:22:11 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.93 2010/12/01 11:45:50 vapier Exp $
27 #
28 # Maintainer: Toolchain Ninjas <toolchain@g.o>
29 #
30 @@ -194,27 +194,28 @@
31 echo
32
33 cd "${MY_BUILDDIR}"
34 - local myconf=""
35 + set --
36 # new versions allow gold and ld; screw older versions
37 if grep -q 'enable-gold=both/ld' "${S}"/configure ; then
38 - myconf="${myconf} --enable-gold=both/ld"
39 + set -- "$@" --enable-gold=both/ld
40 elif grep -q 'enable-gold=both/bfd' "${S}"/configure ; then
41 - myconf="${myconf} --enable-gold=both/bfd"
42 + set -- "$@" --enable-gold=both/bfd
43 fi
44 if grep -q -e '--enable-plugins' "${S}"/ld/configure ; then
45 - myconf="${myconf} --enable-plugins"
46 + set -- "$@" --enable-plugins
47 fi
48 use nls \
49 - && myconf="${myconf} --without-included-gettext" \
50 - || myconf="${myconf} --disable-nls"
51 - use multitarget && myconf="${myconf} --enable-targets=all"
52 - [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
53 - is_cross && myconf="${myconf} --with-sysroot=/usr/${CTARGET}"
54 + && set -- "$@" --without-included-gettext \
55 + || set -- "$@" --disable-nls
56 + use multitarget && set -- "$@" --enable-targets=all
57 + [[ -n ${CBUILD} ]] && set -- "$@" --build=${CBUILD}
58 + is_cross && set -- "$@" --with-sysroot=/usr/${CTARGET}
59 # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
60 # on everyone in alpha (for now), we'll just enable it when possible
61 - has_version ">=${CATEGORY}/glibc-2.5" && myconf="${myconf} --enable-secureplt"
62 - has_version ">=sys-libs/glibc-2.5" && myconf="${myconf} --enable-secureplt"
63 - myconf="--prefix=/usr \
64 + has_version ">=${CATEGORY}/glibc-2.5" && set -- "$@" --enable-secureplt
65 + has_version ">=sys-libs/glibc-2.5" && set -- "$@" --enable-secureplt
66 + set -- "$@" \
67 + --prefix=/usr \
68 --host=${CHOST} \
69 --target=${CTARGET} \
70 --datadir=${DATAPATH} \
71 @@ -227,9 +228,9 @@
72 --enable-64-bit-bfd \
73 --enable-shared \
74 --disable-werror \
75 - ${myconf} ${EXTRA_ECONF}"
76 - echo ./configure ${myconf}
77 - "${S}"/configure ${myconf} || die "configure failed"
78 + ${EXTRA_ECONF}
79 + echo ./configure "$@"
80 + "${S}"/configure "$@" || die
81
82 emake all || die "emake failed"
83
84 @@ -253,13 +254,13 @@
85
86 if [[ ${x} != "UNSUPPORTED" ]] ; then
87 append-flags -I"${S}"/include
88 - myconf="--with-bfd-include-dir=${MY_BUILDDIR}/bfd \
89 + set -- "$@" \
90 + --with-bfd-include-dir=${MY_BUILDDIR}/bfd \
91 --with-libbfd=${MY_BUILDDIR}/bfd/libbfd.a \
92 --with-libiberty=${MY_BUILDDIR}/libiberty/libiberty.a \
93 - --with-binutils-ldscript-dir=${LIBPATH}/ldscripts \
94 - ${myconf}"
95 - echo ./configure ${myconf}
96 - ./configure ${myconf} || die "configure elf2flt failed"
97 + --with-binutils-ldscript-dir=${LIBPATH}/ldscripts
98 + echo ./configure "$@"
99 + ./configure "$@" || die
100 emake || die "make elf2flt failed"
101 fi
102 fi