Contents of /trunk/core/binutils/binutils-2.32-r5.smage2
Parent Directory | Revision Log
Revision 32918 -
(show annotations)
(download)
Fri Oct 4 08:13:48 2019 UTC (4 years, 11 months ago) by niro
File size: 2332 byte(s)
Fri Oct 4 08:13:48 2019 UTC (4 years, 11 months ago) by niro
File size: 2332 byte(s)
-linux-libc-headers-5.3.2, binutils-2.32, glibc-2.27, gcc-9.2.0 toolchain - stage1
1 | # $Id$ |
2 | |
3 | PNAME="binutils" |
4 | PVER="2.32" |
5 | PBUILD="r5" |
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.2.0 |
22 | >= sys-libs/libstdc++-9.2.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 | mirror://${PNAME}/${PNAME}-2.32-do-not-link-with-static-libstdc++.patch |
36 | ) |
37 | |
38 | # unstable |
39 | #UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" |
40 | # stable only |
41 | UP2DATE="updatecmd_gnu ${PNAME} 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 | msetfeature "static !ccache !distcc" |
57 | |
58 | src_prepare() |
59 | { |
60 | munpack ${SRCFILE} || die |
61 | install -d ${SRCDIR}/build || die |
62 | |
63 | cd ${SRCDIR} |
64 | mpatch ${PNAME}-2.32-do-not-link-with-static-libstdc++.patch || 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 | # fortify_source not supported |
79 | export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} |
80 | |
81 | ../configure \ |
82 | --host=${CHOST} \ |
83 | --target=${CCHOST} \ |
84 | --prefix=/usr \ |
85 | --mandir=/usr/share/man \ |
86 | --infodir=/usr/share/info \ |
87 | --libdir=/usr/$(mlibdir) \ |
88 | --with-bugurl="http://bugs.magellan-linux.de/" \ |
89 | --enable-shared \ |
90 | --enable-plugins \ |
91 | --enable-threads \ |
92 | --enable-deterministic-archives \ |
93 | --enable-lto \ |
94 | --enable-relro \ |
95 | --disable-werror \ |
96 | --disable-gdb \ |
97 | --with-pic \ |
98 | --enable-64-bit-bfd \ |
99 | --enable-system-zlib \ |
100 | ${myopts} \ |
101 | || die |
102 | |
103 | make configure-host || die |
104 | mmake tooldir=/usr all || die |
105 | } |
106 | |
107 | src_install() |
108 | { |
109 | cd ${SRCDIR}/build |
110 | |
111 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die |
112 | minstallfile ../include/libiberty.h /usr/include || die |
113 | |
114 | cd ${SRCDIR} |
115 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die |
116 | } |