Magellan Linux

Contents of /smage/trunk/core/binutils/binutils-2.34-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13894 - (show annotations) (download)
Sat Jun 27 12:46:30 2020 UTC (3 years, 10 months ago) by niro
File size: 2175 byte(s)
auto added: ver bump to 2.34-r3
1 # $Id$
2
3 PNAME="binutils"
4 PVER="2.34"
5 PBUILD="r3"
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-9.3.0
22 >= sys-libs/libstdc++-9.3.0"
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 )
36
37 # unstable
38 #UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'"
39 # stable only
40 UP2DATE="updatecmd_gnu ${PNAME} 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 msetfeature "static !ccache !distcc"
56
57 src_prepare()
58 {
59 munpack ${SRCFILE} || die
60 install -d ${SRCDIR}/build || die
61 }
62
63 src_compile()
64 {
65 cd ${SRCDIR}/build
66
67 local myopts
68 if [[ ${GOLD_ENABLED} = 1 ]]
69 then
70 myopts+=" --enable-gold"
71 myopts+=" --enable-ld=default"
72 fi
73
74 # fortify_source not supported
75 export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
76
77 ../configure \
78 --host=${CHOST} \
79 --target=${CCHOST} \
80 --prefix=/usr \
81 --mandir=/usr/share/man \
82 --infodir=/usr/share/info \
83 --libdir=/usr/$(mlibdir) \
84 --with-bugurl="http://bugs.magellan-linux.de/" \
85 --enable-shared \
86 --enable-plugins \
87 --enable-threads \
88 --enable-deterministic-archives \
89 --enable-lto \
90 --enable-relro \
91 --disable-werror \
92 --disable-gdb \
93 --with-pic \
94 --enable-64-bit-bfd \
95 --enable-system-zlib \
96 ${myopts} \
97 || die
98
99 make configure-host || die
100 mmake tooldir=/usr all || die
101 }
102
103 src_install()
104 {
105 cd ${SRCDIR}/build
106
107 mmake DESTDIR=${BINDIR} tooldir=/usr install || die
108 minstallfile ../include/libiberty.h /usr/include || die
109
110 cd ${SRCDIR}
111 minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die
112 }