Contents of /trunk/core/binutils/binutils-2.23.2-r5.smage2
Parent Directory | Revision Log
Revision 17075 -
(show annotations)
(download)
Fri May 31 17:33:57 2013 UTC (11 years, 3 months ago) by niro
File size: 2178 byte(s)
Fri May 31 17:33:57 2013 UTC (11 years, 3 months ago) by niro
File size: 2178 byte(s)
auto added: ver bump to 2.23.2-r5
1 | # $Id$ |
2 | |
3 | PNAME="binutils" |
4 | PVER="2.23.2" |
5 | PBUILD="r5" |
6 | |
7 | PCAT="sys-dev" |
8 | |
9 | DESCRIPTION="Tools necessary to build programs." |
10 | HOMEPAGE="http://www.kernel.org/pub/linux/devel/binutils/" |
11 | |
12 | # enabled 1, or disabled 0 |
13 | GOLD_ENABLED=1 |
14 | |
15 | if [[ ${GOLD_ENABLED} = 1 ]] |
16 | then |
17 | # ld.gold needs libstdc++ and libgcc |
18 | DEPEND=">= sys-libs/libgcc-4.7 |
19 | >= sys-libs/libstdc++-4.7" |
20 | else |
21 | DEPEND="" |
22 | fi |
23 | SDEPEND=">= virtual/kernel-headers" |
24 | |
25 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
26 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
27 | |
28 | sminclude mtools |
29 | |
30 | SRC_URI=( |
31 | http://www.kernel.org/pub/linux/devel/${PNAME}/${SRCFILE} |
32 | gnu://${PNAME}/${SRCFILE} |
33 | mirror://${PNAME}/${SRCFILE} |
34 | mirror://${PNAME}/${PNAME}-2.16.91.0.5-multilib.patch |
35 | ) |
36 | |
37 | # unstable |
38 | #UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" |
39 | # stable only |
40 | UP2DATE="updatecmd 'http://ftp.gnu.org/gnu/${PNAME}/?C=M;O=A' | lasttarball gz" |
41 | |
42 | # binutils don't like strong CFLAGS |
43 | export CFLAGS="${CFLAGS//-O?} -O2" |
44 | export CXXFLAGS="${CFLAGS}" |
45 | |
46 | if [[ -z ${CCHOST} ]] |
47 | then |
48 | # no crosscompile defined |
49 | export CCHOST=${CHOST} |
50 | else |
51 | # use crosscompile host |
52 | export CCHOST=${CCHOST} |
53 | fi |
54 | |
55 | src_prepare() |
56 | { |
57 | munpack ${SRCFILE} || die |
58 | install -d ${SRCDIR}/build || die |
59 | |
60 | cd ${SRCDIR} |
61 | mpatch ${PNAME}-2.16.91.0.5-multilib.patch || die |
62 | |
63 | # fix build with >= texinfo-5 |
64 | sed -i -e 's/@colophon/@@colophon/' \ |
65 | -e 's/doc@cygnus.com/doc@@cygnus.com/' \ |
66 | bfd/doc/bfd.texinfo || die |
67 | } |
68 | |
69 | src_compile() |
70 | { |
71 | cd ${SRCDIR}/build |
72 | |
73 | local myopts |
74 | if [[ ${GOLD_ENABLED} = 1 ]] |
75 | then |
76 | myopts="--enable-gold" |
77 | fi |
78 | |
79 | # fixes compilation, use 'ar' instead of '${CHOST}-ar' |
80 | AR=ar \ |
81 | ../configure \ |
82 | --host=${CHOST} \ |
83 | --target=${CCHOST} \ |
84 | --prefix=/usr \ |
85 | --mandir=/usr/share/man \ |
86 | --infodir=/usr/share/info \ |
87 | --libdir=/usr/$(mlibdir) \ |
88 | --enable-shared \ |
89 | --enable-plugins \ |
90 | --enable-threads \ |
91 | --enable-64-bit-bfd \ |
92 | --disable-werror \ |
93 | --with-pic \ |
94 | ${myopts} \ |
95 | || die |
96 | |
97 | make configure-host || die |
98 | mmake tooldir=/usr all || die |
99 | } |
100 | |
101 | src_install() |
102 | { |
103 | cd ${SRCDIR}/build |
104 | |
105 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die |
106 | minstallfile ../include/libiberty.h /usr/include || die |
107 | |
108 | cd ${SRCDIR} |
109 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die |
110 | } |