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
11 %ifnarch %{ix86} %{x8664}
15 Summary: GNU Binary Utility Development Utilities
16 Summary(de.UTF-8): GNU Binary Utility Development Utilities
17 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU
18 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU
19 Summary(pl.UTF-8): Narzędzia GNU dla programistów
20 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU
21 Summary(ru.UTF-8): Набор инструментов GNU для построения исполняемых программ
22 Summary(tr.UTF-8): GNU geliştirme araçları
23 Summary(uk.UTF-8): Набір інструментів GNU для побудови виконуваних програм
29 Group: Development/Tools
30 Source0: http://www.kernel.org/pub/linux/devel/binutils/%{name}-%{version}.tar.xz
31 # Source0-md5: 7a1649bc101c18434efe6feb86a03d98
32 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
33 # Source1-md5: a717d9707ec77d82acb6ec9078c472d6
34 Patch0: %{name}-gasp.patch
35 Patch1: %{name}-info.patch
36 Patch2: %{name}-libtool-relink.patch
37 Patch3: %{name}-pt_pax_flags.patch
38 Patch5: %{name}-discarded.patch
39 Patch6: %{name}-absolute-gnu_debuglink-path.patch
40 Patch7: %{name}-libtool-m.patch
41 Patch8: %{name}-build-id.patch
42 Patch9: %{name}-tooldir.patch
43 Patch10: %{name}-sanity-check.patch
44 Patch11: %{name}-am.patch
45 URL: http://sources.redhat.com/binutils/
46 BuildRequires: autoconf >= 2.64
47 BuildRequires: automake >= 1:1.11
50 BuildRequires: gettext-devel
51 %{?with_gold:BuildRequires: libstdc++-devel >= 6:4.0-1}
52 %{?with_tests:BuildRequires: libstdc++-static >= 6:4.0}
53 BuildRequires: perl-tools-pod
55 BuildRequires: sparc32
57 BuildRequires: tar >= 1:1.22
58 BuildRequires: texinfo >= 4.2
60 BuildRequires: zlib-devel
61 %{?with_tests:BuildRequires: zlib-static}
62 Conflicts: gcc-c++ < 5:3.3
63 Conflicts: modutils < 2.4.17
64 Conflicts: rpmbuild(macros) < 1.660
65 Obsoletes: binutils-gold
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 Binutils is a collection of binary utilities, including:
70 - ar - create, modify and extract from archives,
71 - nm - lists symbols from object files,
72 - objcopy - copy and translate object files,
73 - objdump - display information from object files,
74 - ranlib - generate an index for the contents of an archive,
75 - size - list the section sizes of an object or archive file,
76 - strings - list printable strings from files,
77 - strip - discard symbols,
78 - addr2line - convert addresses to file and line,
79 - nlmconv - convert object code into an NLM.
81 %description -l es.UTF-8
82 Binutils es una colección de utilitarios necesarios para compilar
83 programas. Incluye assembler y linker, así como varios otros programas
84 para trabajar con formatos que se puedan ejecutar.
86 %description -l pl.UTF-8
87 Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację
88 programów. Znajdują się tutaj między innymi assembler, konsolidator
89 (linker), a także inne narzędzia do manipulowania binarnymi plikami
90 programów i bibliotek.
92 %description -l pt_BR.UTF-8
93 binutils é uma coletânea de utilitários necessários para compilar
94 programas. Inclui assembler e linker, assim como vários outros
95 programas para trabalhar com formatos executáveis.
97 %description -l ru.UTF-8
98 binutils - это набор инструментов, необходимых для компилляции
99 программ. Включает ассемблер, компоновщик и набор других программ для
100 работы с исполняемыми файлами разнообразных форматов.
102 %description -l uk.UTF-8
103 binutils - це набір інструментів, необхідних для компіляції програм.
104 Містить асемблер, компоновщик та інші програми, необхідні для роботи з
105 виконуваними файлами різних форматів.
108 Summary: GNU binutils shared libraries
109 Summary(pl.UTF-8): Biblioteki współdzielone GNU binutils
111 Conflicts: binutils < 3:2.17.50.0.8-3
114 GNU binutils shared libraries (libbfd, libopcodes).
116 %description libs -l pl.UTF-8
117 Biblioteki współdzielone GNU binutils (libbfd, libopcodes).
120 Summary: Development files for GNU binutils libraries
121 Summary(pl.UTF-8): Pliki programistyczne bibliotek GNU binutils
122 Group: Development/Libraries
123 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
126 Development files for GNU binutils libraries (libbfd, libopcodes) and
127 static libiberty library.
129 %description devel -l pl.UTF-8
130 Pliki programistyczne bibliotek GNU binutils (libbfd, libopcodes) oraz
131 statyczna biblioteka libiberty.
134 Summary: GNU binutils static libraries
135 Summary(pl.UTF-8): Biblioteki statyczne do GNU binutils
136 Group: Development/Libraries
137 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
138 #Requires: zlib-static
141 Static GNU binutils libraries (libbfd, libopcodes).
143 %description static -l pl.UTF-8
144 Biblioteki statyczne GNU binutils (libbfd, libopcodes).
147 Summary: GASP - old preprocessor for assembly programs
148 Summary(pl.UTF-8): GASP - stary preprocesor dla programów w asemblerze
149 Group: Development/Tools
150 Requires: %{name} = %{epoch}:%{version}-%{release}
153 GASP - old preprocessor for assembly programs. It's officially
154 obsoleted, but it's still needed to build some packages.
156 %description gasp -l pl.UTF-8
157 GASP - stary preprocesor dla programów w asemblerze. Jest oficjalnie
158 uznany za przestarzały, ale jest nadal potrzebny do zbudowania
166 %{?with_pax:%patch3 -p1}
175 # file contains hacks for ac 2.59 only
176 %{__rm} config/override.m4
182 # non-standard regeneration (needed because of gasp patch)
183 # AM_BINUTILS_WARNINGS in bfd/warning.m4, ZW_GNU_GETTEXT_SISTER_DIR in config/gettext-sister.m4
184 for dir in gas bfd; do
186 %{__aclocal} -I .. -I ../config -I ../bfd
187 %{__automake} Makefile
188 %{__automake} doc/Makefile
203 TARGETS=sparc64-linux
208 %{?addtargets:TARGETS="%{addtargets}"}
210 cp -f /usr/share/automake/config.* .
211 CFLAGS="%{rpmcflags}"; export CFLAGS
212 CXXFLAGS="%{rpmcxxflags}"; export CXXFLAGS
213 CC="%{__cc}"; export CC
214 CXX="%{__cxx}"; export CXX
218 ./configure %{_target_platform} \
221 --enable-build-warnings=,-Wno-missing-prototypes \
226 --prefix=%{_prefix} \
227 --libdir=%{_libdir} \
228 --infodir=%{_infodir} \
229 --mandir=%{_mandir} \
230 --with-tooldir=%{_prefix} \
231 %{!?with_allarchs:`[ -n "${TARGETS}" ] && echo "--enable-targets=${TARGETS}"`} \
233 --enable-64-bit-bfd \
235 %{?with_allarchs:--enable-64-bit-bfd} \
237 %{?with_allarchs:--enable-targets=alpha-linux,arm-linux,cris-linux,hppa-linux,i386-linux,ia64-linux,x86_64-linux,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} \
239 --enable-gold%{!?with_default_bfd:=default} --enable-ld%{?with_default_bfd:=default} \
244 %{?with_tests:%{__make} -j1 check}
247 rm -rf $RPM_BUILD_ROOT
250 DESTDIR=$RPM_BUILD_ROOT
252 %{__rm} $RPM_BUILD_ROOT%{_infodir}/standards.info*
254 # remove these man pages unless we cross-build for win*/netware platforms.
255 # however, this should be done in Makefiles.
256 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windres}.1
258 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
260 cp -p include/libiberty.h $RPM_BUILD_ROOT%{_includedir}
261 cp -p libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
263 # remove evil -L pointing inside builder's home
264 perl -pi -e 's@-L[^ ]*/pic @@g' $RPM_BUILD_ROOT%{_libdir}/libbfd.la
266 [ -x $RPM_BUILD_ROOT%{_bindir}/ld.bfd ] || ln $RPM_BUILD_ROOT%{_bindir}/ld{,.bfd}
268 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
274 touch ld.lang gold.lang
280 cat bfd.lang opcodes.lang > %{name}-libs.lang
281 cat gas.lang gprof.lang ld.lang gold.lang >> %{name}.lang
284 rm -rf $RPM_BUILD_ROOT
286 %post -p /sbin/postshell
287 -/usr/sbin/fix-info-dir -c %{_infodir}
289 %postun -p /sbin/postshell
290 -/usr/sbin/fix-info-dir -c %{_infodir}
292 %post libs -p /sbin/ldconfig
293 %postun libs -p /sbin/ldconfig
295 %post devel -p /sbin/postshell
296 -/usr/sbin/fix-info-dir -c %{_infodir}
298 %postun devel -p /sbin/postshell
299 -/usr/sbin/fix-info-dir -c %{_infodir}
301 %files -f %{name}.lang
302 %defattr(644,root,root,755)
304 %{?with_gold:%doc gold/{ChangeLog,README,TODO}}
305 %attr(755,root,root) %{_bindir}/addr2line
306 %attr(755,root,root) %{_bindir}/ar
307 %attr(755,root,root) %{_bindir}/as
308 %attr(755,root,root) %{_bindir}/c++filt
309 %attr(755,root,root) %{_bindir}/elfedit
310 %attr(755,root,root) %{_bindir}/gprof
311 %attr(755,root,root) %{_bindir}/ld
312 %attr(755,root,root) %{_bindir}/ld.bfd
314 %attr(755,root,root) %{_bindir}/ld.gold
315 %attr(755,root,root) %{_bindir}/dwp
317 %attr(755,root,root) %{_bindir}/nm
318 %attr(755,root,root) %{_bindir}/objcopy
319 %attr(755,root,root) %{_bindir}/objdump
320 %attr(755,root,root) %{_bindir}/ranlib
321 %attr(755,root,root) %{_bindir}/readelf
322 %attr(755,root,root) %{_bindir}/size
323 %attr(755,root,root) %{_bindir}/strings
324 %attr(755,root,root) %{_bindir}/strip
326 %{_infodir}/binutils.info*
327 %{_infodir}/configure.info*
328 %{_infodir}/gprof.info*
330 %{_prefix}/lib/ldscripts
332 %lang(cs) %{_mandir}/cs/man1/*
333 %lang(de) %{_mandir}/de/man1/*
334 %lang(es) %{_mandir}/es/man1/*
335 %lang(fi) %{_mandir}/fi/man1/*
336 %lang(fr) %{_mandir}/fr/man1/*
337 %lang(hu) %{_mandir}/hu/man1/*
338 %lang(ja) %{_mandir}/ja/man1/*
339 %lang(pl) %{_mandir}/pl/man1/*
341 %files libs -f %{name}-libs.lang
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_libdir}/libbfd-*.so
344 %attr(755,root,root) %{_libdir}/libopcodes-*.so
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/libbfd.so
349 %attr(755,root,root) %{_libdir}/libopcodes.so
351 %{_libdir}/libopcodes.la
352 %{_libdir}/libiberty.a
353 %{_includedir}/ansidecl.h
355 %{_includedir}/bfdlink.h
356 %{_includedir}/dis-asm.h
357 %{_includedir}/libiberty.h
358 %{_includedir}/plugin-api.h
359 %{_includedir}/symcat.h
360 %{_infodir}/bfd.info*
363 %defattr(644,root,root,755)
365 %{_libdir}/libopcodes.a
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_bindir}/gasp
370 %{_infodir}/gasp.info*