Contents of /smage/trunk/core/binutils/binutils-2.21.51.0.6-r1.smage2
Parent Directory | Revision Log
Revision 1063 -
(show annotations)
(download)
Tue Jan 25 17:10:01 2011 UTC (13 years, 8 months ago) by niro
File size: 1767 byte(s)
Tue Jan 25 17:10:01 2011 UTC (13 years, 8 months ago) by niro
File size: 1767 byte(s)
auto added: ver bump to 2.21.51.0.6-r1
1 | # $Id: binutils-2.20.51.0.2-r1.smage2 3304 2009-10-19 21:08:54Z niro $ |
2 | |
3 | PNAME="binutils" |
4 | PVER="2.21.51.0.6" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="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 | DEPEND="" |
14 | SDEPEND=">= virtual/kernel-headers" |
15 | |
16 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
18 | |
19 | sminclude mtools mcore |
20 | |
21 | SRC_URI=( |
22 | http://www.kernel.org/pub/linux/devel/${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${SRCFILE} |
24 | mirror://${PNAME}/${PNAME}-2.16.91.0.5-multilib.patch |
25 | ) |
26 | |
27 | UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" |
28 | |
29 | # binutils don't like strong CFLAGS |
30 | export CFLAGS="${CFLAGS//-O?} -O2" |
31 | export CXXFLAGS="${CFLAGS}" |
32 | |
33 | if [[ -z ${CCHOST} ]] |
34 | then |
35 | # no crosscompile defined |
36 | export CCHOST=${CHOST} |
37 | else |
38 | # use crosscompile host |
39 | export CCHOST=${CCHOST} |
40 | fi |
41 | |
42 | src_prepare() |
43 | { |
44 | munpack ${SRCFILE} || die |
45 | install -d ${SRCDIR}/build || die |
46 | |
47 | cd ${SRCDIR} |
48 | mpatch ${PNAME}-2.16.91.0.5-multilib.patch || die |
49 | } |
50 | |
51 | src_compile() |
52 | { |
53 | cd ${SRCDIR}/build |
54 | |
55 | # fixes compilation, use 'ar' instead of '${CHOST}-ar' |
56 | AR=ar \ |
57 | ../configure \ |
58 | --host=${CHOST} \ |
59 | --target=${CCHOST} \ |
60 | --prefix=/usr \ |
61 | --mandir=/usr/share/man \ |
62 | --infodir=/usr/share/info \ |
63 | --libdir=/usr/$(mlibdir) \ |
64 | --enable-shared \ |
65 | --enable-gold \ |
66 | --enable-plugins \ |
67 | --enable-threads \ |
68 | --enable-64-bit-bfd \ |
69 | --disable-werror \ |
70 | || die |
71 | |
72 | make configure-host || die |
73 | mmake tooldir=/usr all || die |
74 | } |
75 | |
76 | src_install() |
77 | { |
78 | cd ${SRCDIR}/build |
79 | |
80 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die |
81 | minstallfile ../include/libiberty.h /usr/include || die |
82 | |
83 | cd ${SRCDIR} |
84 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die |
85 | } |