Contents of /branches/magellan-next/core/binutils/binutils-2.21.53.0.2-r3.smage2
Parent Directory | Revision Log
Revision 9135 -
(show annotations)
(download)
Mon Nov 7 17:53:15 2011 UTC (12 years, 10 months ago) by niro
File size: 1702 byte(s)
Mon Nov 7 17:53:15 2011 UTC (12 years, 10 months ago) by niro
File size: 1702 byte(s)
-another multilib try without any patches
1 | # $Id$ |
2 | |
3 | PNAME="binutils" |
4 | PVER="2.21.53.0.2" |
5 | PBUILD="r3" |
6 | |
7 | PCATEGORIE="sys-dev" |
8 | |
9 | DESCRIPTION="Tools necessary to build programs." |
10 | HOMEPAGE="http://www.kernel.org/pub/linux/devel/binutils/" |
11 | |
12 | DEPEND="" |
13 | SDEPEND=">= virtual/kernel-headers" |
14 | |
15 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
17 | |
18 | sminclude mtools |
19 | |
20 | SRC_URI=( |
21 | http://www.kernel.org/pub/linux/devel/${PNAME}/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | ) |
24 | |
25 | UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" |
26 | |
27 | # binutils don't like strong CFLAGS |
28 | export CFLAGS="${CFLAGS//-O?} -O2" |
29 | export CXXFLAGS="${CFLAGS}" |
30 | |
31 | if [[ -z ${CCHOST} ]] |
32 | then |
33 | # no crosscompile defined |
34 | export CCHOST=${CHOST} |
35 | else |
36 | # use crosscompile host |
37 | export CCHOST=${CCHOST} |
38 | fi |
39 | |
40 | src_prepare() |
41 | { |
42 | munpack ${SRCFILE} || die |
43 | install -d ${SRCDIR}/build || die |
44 | } |
45 | |
46 | src_compile() |
47 | { |
48 | local myflags |
49 | |
50 | cd ${SRCDIR}/build |
51 | |
52 | # fix search path on multilib |
53 | if [[ $(mlibdir) != lib ]] |
54 | then |
55 | myflags="-Wl,-rpath-link,/usr/$(mlibdir):/$(mlibdir):/usr/lib:/lib -m64" |
56 | fi |
57 | |
58 | # fixes compilation, use 'ar' instead of '${CHOST}-ar' |
59 | AR=ar \ |
60 | LDFLAGS="${myflags}" \ |
61 | ../configure \ |
62 | --host=${CHOST} \ |
63 | --target=${CCHOST} \ |
64 | --prefix=/usr \ |
65 | --mandir=/usr/share/man \ |
66 | --infodir=/usr/share/info \ |
67 | --libdir=/usr/$(mlibdir) \ |
68 | --enable-shared \ |
69 | --enable-gold \ |
70 | --enable-plugins \ |
71 | --enable-threads \ |
72 | --enable-64-bit-bfd \ |
73 | --disable-werror \ |
74 | || die |
75 | |
76 | make configure-host || die |
77 | mmake tooldir=/usr all || die |
78 | } |
79 | |
80 | src_install() |
81 | { |
82 | cd ${SRCDIR}/build |
83 | |
84 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die |
85 | minstallfile ../include/libiberty.h /usr/include || die |
86 | |
87 | cd ${SRCDIR} |
88 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die |
89 | } |