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