Contents of /smage/branches/alx08x-unstable/core/binutils/binutils-2.41-r2.smage2
Parent Directory | Revision Log
Revision 17340 -
(show annotations)
(download)
Wed Nov 22 10:38:57 2023 UTC (6 months, 3 weeks ago) by niro
File size: 3126 byte(s)
Wed Nov 22 10:38:57 2023 UTC (6 months, 3 weeks ago) by niro
File size: 3126 byte(s)
-release branches/alx08x-unstable
1 | # $Id$ |
2 | |
3 | PNAME="binutils" |
4 | PVER="2.41" |
5 | PBUILD="r2" |
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 | DEPEND=">= virtual/glibc |
13 | >= sys-libs/zlib-1.2.13 |
14 | >= sys-libs/libgcc-13.2.0 |
15 | >= sys-libs/libstdc++-13.2.0 |
16 | >= app-arch/zstd-1.5" |
17 | # todo libelf jansson |
18 | SDEPEND=">= virtual/kernel-headers" |
19 | |
20 | SRCFILE="${PNAME}-${PVER}.tar.xz" |
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
22 | |
23 | sminclude mtools |
24 | |
25 | SRC_URI=( |
26 | http://www.kernel.org/pub/linux/devel/${PNAME}/${SRCFILE} |
27 | gnu://${PNAME}/${SRCFILE} |
28 | mirror://${PNAME}/${SRCFILE} |
29 | ) |
30 | |
31 | # unstable |
32 | #UP2DATE="updatecmd ${HOMEPAGE} | sed -n 's/.*release.binutils-\(.*\).*/\1/;$ p'" |
33 | # stable only |
34 | UP2DATE="updatecmd_gnu ${PNAME} xz" |
35 | |
36 | # binutils don't like strong CFLAGS |
37 | export CFLAGS="${CFLAGS//-O?} -O2" |
38 | export CXXFLAGS="${CFLAGS}" |
39 | |
40 | if [[ -z ${CCHOST} ]] |
41 | then |
42 | # no crosscompile defined |
43 | export CCHOST=${CHOST} |
44 | else |
45 | # use crosscompile host |
46 | export CCHOST=${CCHOST} |
47 | fi |
48 | |
49 | msetfeature "static !ccache !distcc" |
50 | |
51 | src_prepare() |
52 | { |
53 | munpack ${SRCFILE} || die |
54 | install -d ${SRCDIR}/build || die |
55 | |
56 | cd ${SRCDIR} |
57 | # disable development mode |
58 | sed -i '/^development=/s/true/false/' bfd/development.sh || die |
59 | } |
60 | |
61 | src_compile() |
62 | { |
63 | cd ${SRCDIR}/build |
64 | |
65 | # always enable gold |
66 | myopts+=" --enable-gold" |
67 | myopts+=" --enable-ld=default" |
68 | |
69 | # enable cet |
70 | myopts+=" --enable-cet" |
71 | |
72 | # disable debuginfod |
73 | myopts+=" --without-debuginfod" |
74 | |
75 | # enable multilib |
76 | myopts+=" --enable-multilib" |
77 | |
78 | # build lto with pgo |
79 | #myopts+=" --enable-pgo-build=lto" |
80 | |
81 | # # fortify_source not supported |
82 | # export CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} |
83 | |
84 | ../configure \ |
85 | --host=${CHOST} \ |
86 | --target=${CCHOST} \ |
87 | --prefix=/usr \ |
88 | --sysconfdir=/etc \ |
89 | --mandir=/usr/share/man \ |
90 | --infodir=/usr/share/info \ |
91 | --libdir=/usr/$(mlibdir) \ |
92 | --with-bugurl="http://bugs.magellan-linux.de/" \ |
93 | --enable-shared \ |
94 | --enable-plugins \ |
95 | --enable-threads \ |
96 | --enable-deterministic-archives \ |
97 | --enable-relro \ |
98 | --enable-colored-disassembly \ |
99 | --enable-default-execstack=no \ |
100 | --enable-install-libiberty \ |
101 | --enable-new-dtags \ |
102 | --disable-werror \ |
103 | --disable-gdb \ |
104 | --disable-gdbserver \ |
105 | --disable-libdecnumber \ |
106 | --disable-readline \ |
107 | --disable-jansson \ |
108 | --disable-sim \ |
109 | --with-pic \ |
110 | --enable-64-bit-bfd \ |
111 | --enable-system-zlib \ |
112 | ${myopts} \ |
113 | || die |
114 | |
115 | mmake tooldir=/usr all || die |
116 | } |
117 | |
118 | src_install() |
119 | { |
120 | cd ${SRCDIR}/build |
121 | |
122 | mmake DESTDIR=${BINDIR} tooldir=/usr install || die |
123 | |
124 | # install PIC version of libiberty |
125 | minstallfile libiberty/pic/libiberty.a /usr/$(mlibdir) || die |
126 | |
127 | # no shared linking to these files outside binutils |
128 | mdelete /usr/$(mlibdir)/libbfd.so || die |
129 | echo 'INPUT( /usr/lib/libbfd.a -lsframe -liberty -lz -lzstd -ldl )' > ${BINDIR}/usr/$(mlibdir)/libbfd.so || die |
130 | mdelete /usr/$(mlibdir)/libopcodes.so || die |
131 | echo 'INPUT( /usr/lib/libopcodes.a -lbfd )' > ${BINDIR}/usr/$(mlibdir)/libopcodes.so || die |
132 | |
133 | # remove unwanted files |
134 | mdelete /usr/share/man/man1/dlltool* || die |
135 | mdelete /usr/share/man/man1/windres* || die |
136 | mdelete /usr/share/man/man1/windmc* || die |
137 | |
138 | cd ${SRCDIR} |
139 | minstalldocs ChangeLog* COPYING* MAINTAINERS README* || die |
140 | } |