Magellan Linux

Annotation of /trunk/core/binutils/binutils-2.34-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33310 - (hide annotations) (download)
Mon May 25 12:01:59 2020 UTC (3 years, 11 months ago) by niro
File size: 2375 byte(s)
auto added: ver bump to 2.34-r1
1 niro 33310 # $Id$
2    
3     PNAME="binutils"
4     PVER="2.34"
5     PBUILD="r1"
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     cd ${SRCDIR}
63     # disable development mode
64     sed -i '/^development=/s/true/false/' bfd/development.sh || die
65     }
66    
67     src_compile()
68     {
69     cd ${SRCDIR}/build
70    
71     local myopts
72     if [[ ${GOLD_ENABLED} = 1 ]]
73     then
74     myopts+=" --enable-gold"
75     myopts+=" --enable-ld=default"
76     fi
77    
78     # enable cet
79     myopts+=" --enable-cet"
80    
81     # enable debuginfod
82     myopts+=" --with-debuginfod"
83    
84     # fortify_source not supported
85     export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
86    
87     ../configure \
88     --host=${CHOST} \
89     --target=${CCHOST} \
90     --prefix=/usr \
91     --mandir=/usr/share/man \
92     --infodir=/usr/share/info \
93     --libdir=/usr/$(mlibdir) \
94     --with-bugurl="http://bugs.magellan-linux.de/" \
95     --enable-shared \
96     --enable-plugins \
97     --enable-threads \
98     --enable-deterministic-archives \
99     --enable-lto \
100     --enable-relro \
101     --disable-werror \
102     --disable-gdb \
103     --with-pic \
104     --enable-64-bit-bfd \
105     --enable-system-zlib \
106     ${myopts} \
107     || die
108    
109     make configure-host || die
110     mmake tooldir=/usr all || die
111     }
112    
113     src_install()
114     {
115     cd ${SRCDIR}/build
116    
117     mmake DESTDIR=${BINDIR} tooldir=/usr install || die
118     minstallfile ../include/libiberty.h /usr/include || die
119    
120     cd ${SRCDIR}
121     minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die
122     }