Magellan Linux

Contents of /branches/R11-stable/core/binutils/binutils-2.24-r9.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22663 - (show annotations) (download)
Tue Oct 28 08:16:34 2014 UTC (9 years, 7 months ago) by niro
File size: 2118 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="binutils"
4 PVER="2.24"
5 PBUILD="r9"
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 DEPEND=">= virtual/glibc
16 >= sys-libs/zlib-1.2.8"
17 if [[ ${GOLD_ENABLED} = 1 ]]
18 then
19 # ld.gold needs libstdc++ and libgcc
20 DEPEND="${DEPEND}
21 >= sys-libs/libgcc-4.8.3
22 >= sys-libs/libstdc++-4.8.3"
23 fi
24 SDEPEND=">= virtual/kernel-headers"
25
26 SRCFILE="${PNAME}-${PVER}.tar.gz"
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 # unstable
39 #UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'"
40 # stable only
41 UP2DATE="updatecmd 'http://ftp.gnu.org/gnu/${PNAME}/?C=M;O=A' | lasttarball gz"
42
43 # binutils don't like strong CFLAGS
44 export CFLAGS="${CFLAGS//-O?} -O2"
45 export CXXFLAGS="${CFLAGS}"
46
47 if [[ -z ${CCHOST} ]]
48 then
49 # no crosscompile defined
50 export CCHOST=${CHOST}
51 else
52 # use crosscompile host
53 export CCHOST=${CCHOST}
54 fi
55
56 src_prepare()
57 {
58 munpack ${SRCFILE} || die
59 install -d ${SRCDIR}/build || die
60
61 cd ${SRCDIR}
62 mpatch ${PNAME}-2.16.91.0.5-multilib.patch || die
63 }
64
65 src_compile()
66 {
67 cd ${SRCDIR}/build
68
69 local myopts
70 if [[ ${GOLD_ENABLED} = 1 ]]
71 then
72 myopts+=" --enable-gold"
73 myopts+=" --enable-ld=default"
74 fi
75
76 #--enable-64-bit-bfd \
77 # fixes compilation, use 'ar' instead of '${CHOST}-ar'
78 AR=ar \
79 ../configure \
80 --host=${CHOST} \
81 --target=${CCHOST} \
82 --prefix=/usr \
83 --mandir=/usr/share/man \
84 --infodir=/usr/share/info \
85 --libdir=/usr/$(mlibdir) \
86 --enable-shared \
87 --enable-plugins \
88 --enable-threads \
89 --disable-werror \
90 --with-pic \
91 ${myopts} \
92 || die
93
94 make configure-host || die
95 mmake tooldir=/usr all || die
96 }
97
98 src_install()
99 {
100 cd ${SRCDIR}/build
101
102 mmake DESTDIR=${BINDIR} tooldir=/usr install || die
103 minstallfile ../include/libiberty.h /usr/include || die
104
105 cd ${SRCDIR}
106 minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die
107 }