]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with allarchs # enable all targets | |
4 | # define addtargets x,y,z # build with additional targets x,y,z (e.g. x86_64-linux) | |
5 | # http://sourceware.org/ml/binutils/2008-03/msg00162.html | |
6 | %bcond_without pax # without PaX flags (for upstream bugreports) | |
7 | %bcond_without gold # don't build gold (no C++ dependencies) | |
8 | %bcond_without default_bfd # default ld.bfd instead of gold | |
9 | %bcond_without gasp # gasp | |
10 | %bcond_with tests # check target | |
11 | ||
12 | %ifnarch %{ix86} %{x8664} x32 | |
13 | %undefine with_gold | |
14 | %endif | |
15 | ||
16 | Summary: GNU Binary Utility Development Utilities | |
17 | Summary(de.UTF-8): GNU Binary Utility Development Utilities | |
18 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU | |
19 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU | |
20 | Summary(pl.UTF-8): Narzędzia GNU dla programistów | |
21 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU | |
22 | Summary(ru.UTF-8): Набор инструментов GNU для построения исполняемых программ | |
23 | Summary(tr.UTF-8): GNU geliştirme araçları | |
24 | Summary(uk.UTF-8): Набір інструментів GNU для побудови виконуваних програм | |
25 | Name: binutils | |
26 | Version: 2.29.1 | |
27 | Release: 1 | |
28 | Epoch: 4 | |
29 | License: GPL v3+ | |
30 | Group: Development/Tools | |
31 | Source0: http://ftp.gnu.org/gnu/binutils/%{name}-%{version}.tar.bz2 | |
32 | # Source0-md5: 9af59a2ca3488823e453bb356fe0f113 | |
33 | Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2 | |
34 | # Source1-md5: a717d9707ec77d82acb6ec9078c472d6 | |
35 | Patch0: %{name}-gasp.patch | |
36 | Patch1: %{name}-info.patch | |
37 | Patch2: %{name}-libtool-relink.patch | |
38 | Patch3: %{name}-pt_pax_flags.patch | |
39 | Patch4: %{name}-libdir.patch | |
40 | Patch5: %{name}-discarded.patch | |
41 | Patch6: %{name}-absolute-gnu_debuglink-path.patch | |
42 | Patch7: %{name}-libtool-m.patch | |
43 | Patch8: %{name}-build-id.patch | |
44 | Patch9: %{name}-tooldir.patch | |
45 | Patch10: %{name}-sanity-check.patch | |
46 | Patch11: %{name}-am.patch | |
47 | URL: http://sources.redhat.com/binutils/ | |
48 | BuildRequires: autoconf >= 2.64 | |
49 | BuildRequires: automake >= 1:1.11 | |
50 | BuildRequires: bison | |
51 | BuildRequires: flex | |
52 | BuildRequires: gettext-tools | |
53 | %{?with_gold:BuildRequires: libstdc++-devel >= 6:4.0-1} | |
54 | %{?with_tests:BuildRequires: libstdc++-static >= 6:4.0} | |
55 | BuildRequires: perl-tools-pod | |
56 | %ifarch sparc sparc32 | |
57 | BuildRequires: sparc32 | |
58 | %endif | |
59 | BuildRequires: tar >= 1:1.22 | |
60 | BuildRequires: texinfo >= 4.2 | |
61 | BuildRequires: xz | |
62 | BuildRequires: zlib-devel | |
63 | %{?with_tests:BuildRequires: zlib-static} | |
64 | Conflicts: gcc-c++ < 5:3.3 | |
65 | Conflicts: modutils < 2.4.17 | |
66 | Conflicts: rpmbuild(macros) < 1.660 | |
67 | Obsoletes: binutils-gold | |
68 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
69 | ||
70 | %description | |
71 | Binutils is a collection of binary utilities, including: | |
72 | - ar - create, modify and extract from archives, | |
73 | - nm - lists symbols from object files, | |
74 | - objcopy - copy and translate object files, | |
75 | - objdump - display information from object files, | |
76 | - ranlib - generate an index for the contents of an archive, | |
77 | - size - list the section sizes of an object or archive file, | |
78 | - strings - list printable strings from files, | |
79 | - strip - discard symbols, | |
80 | - addr2line - convert addresses to file and line, | |
81 | - nlmconv - convert object code into an NLM. | |
82 | ||
83 | %description -l es.UTF-8 | |
84 | Binutils es una colección de utilitarios necesarios para compilar | |
85 | programas. Incluye assembler y linker, así como varios otros programas | |
86 | para trabajar con formatos que se puedan ejecutar. | |
87 | ||
88 | %description -l pl.UTF-8 | |
89 | Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację | |
90 | programów. Znajdują się tutaj między innymi assembler, konsolidator | |
91 | (linker), a także inne narzędzia do manipulowania binarnymi plikami | |
92 | programów i bibliotek. | |
93 | ||
94 | %description -l pt_BR.UTF-8 | |
95 | binutils é uma coletânea de utilitários necessários para compilar | |
96 | programas. Inclui assembler e linker, assim como vários outros | |
97 | programas para trabalhar com formatos executáveis. | |
98 | ||
99 | %description -l ru.UTF-8 | |
100 | binutils - это набор инструментов, необходимых для компилляции | |
101 | программ. Включает ассемблер, компоновщик и набор других программ для | |
102 | работы с исполняемыми файлами разнообразных форматов. | |
103 | ||
104 | %description -l uk.UTF-8 | |
105 | binutils - це набір інструментів, необхідних для компіляції програм. | |
106 | Містить асемблер, компоновщик та інші програми, необхідні для роботи з | |
107 | виконуваними файлами різних форматів. | |
108 | ||
109 | %package libs | |
110 | Summary: GNU binutils shared libraries | |
111 | Summary(pl.UTF-8): Biblioteki współdzielone GNU binutils | |
112 | Group: Libraries | |
113 | Conflicts: binutils < 3:2.17.50.0.8-3 | |
114 | ||
115 | %description libs | |
116 | GNU binutils shared libraries (libbfd, libopcodes). | |
117 | ||
118 | %description libs -l pl.UTF-8 | |
119 | Biblioteki współdzielone GNU binutils (libbfd, libopcodes). | |
120 | ||
121 | %package devel | |
122 | Summary: Development files for GNU binutils libraries | |
123 | Summary(pl.UTF-8): Pliki programistyczne bibliotek GNU binutils | |
124 | Group: Development/Libraries | |
125 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} | |
126 | ||
127 | %description devel | |
128 | Development files for GNU binutils libraries (libbfd, libopcodes) and | |
129 | static libiberty library. | |
130 | ||
131 | %description devel -l pl.UTF-8 | |
132 | Pliki programistyczne bibliotek GNU binutils (libbfd, libopcodes) oraz | |
133 | statyczna biblioteka libiberty. | |
134 | ||
135 | %package static | |
136 | Summary: GNU binutils static libraries | |
137 | Summary(pl.UTF-8): Biblioteki statyczne do GNU binutils | |
138 | Group: Development/Libraries | |
139 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
140 | #Requires: zlib-static | |
141 | ||
142 | %description static | |
143 | Static GNU binutils libraries (libbfd, libopcodes). | |
144 | ||
145 | %description static -l pl.UTF-8 | |
146 | Biblioteki statyczne GNU binutils (libbfd, libopcodes). | |
147 | ||
148 | %package gasp | |
149 | Summary: GASP - old preprocessor for assembly programs | |
150 | Summary(pl.UTF-8): GASP - stary preprocesor dla programów w asemblerze | |
151 | Group: Development/Tools | |
152 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
153 | ||
154 | %description gasp | |
155 | GASP - old preprocessor for assembly programs. It's officially | |
156 | obsoleted, but it's still needed to build some packages. | |
157 | ||
158 | %description gasp -l pl.UTF-8 | |
159 | GASP - stary preprocesor dla programów w asemblerze. Jest oficjalnie | |
160 | uznany za przestarzały, ale jest nadal potrzebny do zbudowania | |
161 | niektórych pakietów. | |
162 | ||
163 | %prep | |
164 | %setup -q | |
165 | %{?with_gasp:%patch0 -p1} | |
166 | %patch1 -p1 | |
167 | %patch2 -p1 | |
168 | %{?with_pax:%patch3 -p1} | |
169 | %patch4 -p1 | |
170 | %patch5 -p1 | |
171 | %patch6 -p1 | |
172 | %patch7 -p1 | |
173 | %patch8 -p1 | |
174 | %patch9 -p1 | |
175 | %patch10 -p1 | |
176 | %patch11 -p1 | |
177 | ||
178 | # file contains hacks for ac 2.59 only | |
179 | %{__rm} config/override.m4 | |
180 | ||
181 | %build | |
182 | %{__aclocal} | |
183 | %{__autoconf} | |
184 | ||
185 | # non-standard regeneration (needed because of gasp patch) | |
186 | # AM_BINUTILS_WARNINGS in bfd/warning.m4, ZW_GNU_GETTEXT_SISTER_DIR in config/gettext-sister.m4 | |
187 | for dir in gas bfd; do | |
188 | cd $dir || exit 1 | |
189 | %{__aclocal} -I .. -I ../config -I ../bfd | |
190 | %{__automake} Makefile | |
191 | %{__automake} doc/Makefile | |
192 | %{__autoconf} | |
193 | cd .. | |
194 | done | |
195 | ||
196 | # More targets | |
197 | TARGETS= | |
198 | %ifarch ia64 | |
199 | TARGETS=i686-linux | |
200 | %endif | |
201 | # uhm? | |
202 | %ifarch %{ix86} | |
203 | TARGETS=x86_64-linux | |
204 | %endif | |
205 | %ifarch sparc | |
206 | TARGETS=sparc64-linux | |
207 | %endif | |
208 | %ifarch %{x8664} | |
209 | TARGETS="x86_64-pep" | |
210 | %endif | |
211 | %ifarch x32 | |
212 | TARGETS="x86_64-linux,x86_64-pep" | |
213 | %endif | |
214 | %{?addtargets:TARGETS="%{addtargets}"} | |
215 | ||
216 | cp -f /usr/share/automake/config.* . | |
217 | CFLAGS="%{rpmcflags}"; export CFLAGS | |
218 | CXXFLAGS="%{rpmcxxflags}"; export CXXFLAGS | |
219 | CC="%{__cc}"; export CC | |
220 | CXX="%{__cxx}"; export CXX | |
221 | %ifarch sparc | |
222 | sparc32 \ | |
223 | %endif | |
224 | ./configure %{_target_platform} \ | |
225 | --disable-debug \ | |
226 | --disable-werror \ | |
227 | --enable-build-warnings=,-Wno-missing-prototypes \ | |
228 | --enable-shared \ | |
229 | --enable-lto \ | |
230 | --enable-plugins \ | |
231 | --with-zlib=yes \ | |
232 | --prefix=%{_prefix} \ | |
233 | --libdir=%{_libdir} \ | |
234 | --infodir=%{_infodir} \ | |
235 | --mandir=%{_mandir} \ | |
236 | --with-tooldir=%{_prefix} \ | |
237 | %{!?with_allarchs:`[ -n "${TARGETS}" ] && echo "--enable-targets=${TARGETS}"`} \ | |
238 | %ifarch sparc | |
239 | --enable-64-bit-bfd \ | |
240 | %else | |
241 | %{?with_allarchs:--enable-64-bit-bfd} \ | |
242 | %endif | |
243 | %{?with_allarchs:--enable-targets=alpha-linux,arm-linux,cris-linux,hppa-linux,i386-linux,ia64-linux,x86_64-linux,x86_64-linux-gnux32,m68k-linux,mips-linux,mips64-linux,mips64el-linux,mipsel-linux,ppc-linux,s390-linux,s390x-linux,sh-linux,sparc-linux,sparc64-linux,i386-linuxaout,x86_64-pep} \ | |
244 | %if %{with gold} | |
245 | --enable-gold%{!?with_default_bfd:=default} --enable-ld%{?with_default_bfd:=default} \ | |
246 | %endif | |
247 | ||
248 | %{__make} -j1 | |
249 | ||
250 | %{?with_tests:%{__make} -j1 check} | |
251 | ||
252 | %install | |
253 | rm -rf $RPM_BUILD_ROOT | |
254 | install -d $RPM_BUILD_ROOT%{_libdir}/bfd-plugins | |
255 | ||
256 | %{__make} install \ | |
257 | DESTDIR=$RPM_BUILD_ROOT | |
258 | ||
259 | # remove these man pages unless we cross-build for win*/netware platforms. | |
260 | # however, this should be done in Makefiles. | |
261 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windmc,windres}.1 | |
262 | ||
263 | bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir} | |
264 | ||
265 | cp -p include/libiberty.h $RPM_BUILD_ROOT%{_includedir} | |
266 | cp -p libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir} | |
267 | ||
268 | # remove evil -L pointing inside builder's home | |
269 | perl -pi -e 's@-L[^ ]*/pic @@g' $RPM_BUILD_ROOT%{_libdir}/libbfd.la | |
270 | ||
271 | [ -x $RPM_BUILD_ROOT%{_bindir}/ld.bfd ] || ln $RPM_BUILD_ROOT%{_bindir}/ld{,.bfd} | |
272 | ||
273 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir | |
274 | ||
275 | %find_lang bfd | |
276 | %find_lang binutils | |
277 | %find_lang gas | |
278 | %find_lang gprof | |
279 | touch ld.lang gold.lang | |
280 | %find_lang ld | |
281 | %if %{with gold} | |
282 | %find_lang gold | |
283 | %endif | |
284 | %find_lang opcodes | |
285 | cat bfd.lang opcodes.lang > %{name}-libs.lang | |
286 | cat gas.lang gprof.lang ld.lang gold.lang >> %{name}.lang | |
287 | ||
288 | %clean | |
289 | rm -rf $RPM_BUILD_ROOT | |
290 | ||
291 | %post -p /sbin/postshell | |
292 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
293 | ||
294 | %postun -p /sbin/postshell | |
295 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
296 | ||
297 | %post libs -p /sbin/ldconfig | |
298 | %postun libs -p /sbin/ldconfig | |
299 | ||
300 | %post devel -p /sbin/postshell | |
301 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
302 | ||
303 | %postun devel -p /sbin/postshell | |
304 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
305 | ||
306 | %post gasp -p /sbin/postshell | |
307 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
308 | ||
309 | %postun gasp -p /sbin/postshell | |
310 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
311 | ||
312 | %files -f %{name}.lang | |
313 | %defattr(644,root,root,755) | |
314 | %doc README | |
315 | %{?with_gold:%doc gold/{ChangeLog,README,TODO}} | |
316 | %attr(755,root,root) %{_bindir}/addr2line | |
317 | %attr(755,root,root) %{_bindir}/ar | |
318 | %attr(755,root,root) %{_bindir}/as | |
319 | %attr(755,root,root) %{_bindir}/c++filt | |
320 | %attr(755,root,root) %{_bindir}/elfedit | |
321 | %attr(755,root,root) %{_bindir}/gprof | |
322 | %attr(755,root,root) %{_bindir}/ld | |
323 | %attr(755,root,root) %{_bindir}/ld.bfd | |
324 | %if %{with gold} | |
325 | %attr(755,root,root) %{_bindir}/ld.gold | |
326 | %attr(755,root,root) %{_bindir}/dwp | |
327 | %endif | |
328 | %attr(755,root,root) %{_bindir}/nm | |
329 | %attr(755,root,root) %{_bindir}/objcopy | |
330 | %attr(755,root,root) %{_bindir}/objdump | |
331 | %attr(755,root,root) %{_bindir}/ranlib | |
332 | %attr(755,root,root) %{_bindir}/readelf | |
333 | %attr(755,root,root) %{_bindir}/size | |
334 | %attr(755,root,root) %{_bindir}/strings | |
335 | %attr(755,root,root) %{_bindir}/strip | |
336 | %{_prefix}/lib/ldscripts | |
337 | %{_infodir}/as.info* | |
338 | %{_infodir}/binutils.info* | |
339 | %{_infodir}/gprof.info* | |
340 | %{_infodir}/ld.info* | |
341 | %{_mandir}/man1/addr2line.1* | |
342 | %{_mandir}/man1/ar.1* | |
343 | %{_mandir}/man1/as.1* | |
344 | %{_mandir}/man1/c++filt.1* | |
345 | %{_mandir}/man1/elfedit.1* | |
346 | %{_mandir}/man1/gprof.1* | |
347 | %{_mandir}/man1/ld.1* | |
348 | %{_mandir}/man1/nm.1* | |
349 | %{_mandir}/man1/objcopy.1* | |
350 | %{_mandir}/man1/objdump.1* | |
351 | %{_mandir}/man1/ranlib.1* | |
352 | %{_mandir}/man1/readelf.1* | |
353 | %{_mandir}/man1/size.1* | |
354 | %{_mandir}/man1/strings.1* | |
355 | %{_mandir}/man1/strip.1* | |
356 | %lang(cs) %{_mandir}/cs/man1/* | |
357 | %lang(de) %{_mandir}/de/man1/* | |
358 | %lang(es) %{_mandir}/es/man1/* | |
359 | %lang(fi) %{_mandir}/fi/man1/* | |
360 | %lang(fr) %{_mandir}/fr/man1/* | |
361 | %lang(hu) %{_mandir}/hu/man1/* | |
362 | %lang(ja) %{_mandir}/ja/man1/* | |
363 | %lang(pl) %{_mandir}/pl/man1/* | |
364 | ||
365 | %files libs -f %{name}-libs.lang | |
366 | %defattr(644,root,root,755) | |
367 | %attr(755,root,root) %{_libdir}/libbfd-%{version}.so | |
368 | %attr(755,root,root) %{_libdir}/libopcodes-%{version}.so | |
369 | %dir %{_libdir}/bfd-plugins | |
370 | ||
371 | %files devel | |
372 | %defattr(644,root,root,755) | |
373 | %attr(755,root,root) %{_libdir}/libbfd.so | |
374 | %attr(755,root,root) %{_libdir}/libopcodes.so | |
375 | %{_libdir}/libbfd.la | |
376 | %{_libdir}/libopcodes.la | |
377 | %{_libdir}/libiberty.a | |
378 | %{_includedir}/ansidecl.h | |
379 | %{_includedir}/bfd.h | |
380 | %{_includedir}/bfdlink.h | |
381 | %{_includedir}/dis-asm.h | |
382 | %{_includedir}/libiberty.h | |
383 | %{_includedir}/plugin-api.h | |
384 | %{_includedir}/symcat.h | |
385 | %{_infodir}/bfd.info* | |
386 | ||
387 | %files static | |
388 | %defattr(644,root,root,755) | |
389 | %{_libdir}/libbfd.a | |
390 | %{_libdir}/libopcodes.a | |
391 | ||
392 | %if %{with gasp} | |
393 | %files gasp | |
394 | %defattr(644,root,root,755) | |
395 | %attr(755,root,root) %{_bindir}/gasp | |
396 | %{_infodir}/gasp.info* | |
397 | %endif |