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