]> git.pld-linux.org Git - packages/binutils.git/blame - binutils.spec
up to 2.39 (gasp disabled by default)
[packages/binutils.git] / binutils.spec
CommitLineData
baf235c6 1# TODO: PR/26302 <https://sourceware.org/bugzilla/show_bug.cgi?id=26302> (breaks kernel-tools build)
c5304b32 2#
501f7670
JB
3# Conditional build:
4%bcond_with allarchs # enable all targets
5# define addtargets x,y,z # build with additional targets x,y,z (e.g. x86_64-linux)
a3e16156 6 # http://sourceware.org/ml/binutils/2008-03/msg00162.html
46bb8853 7%bcond_with pax # without PaX flags (for upstream bugreports)
a18955a2 8%bcond_without gold # don't build gold (no C++ dependencies)
93de8f98 9%bcond_without default_bfd # default ld.bfd instead of gold
4a5e8616
JP
10%bcond_with gasp # gasp
11%bcond_without gprofng # gprofng
12%bcond_without jansson # Package Metadata embedding support
13%bcond_without msgpack # msgpack support
62302ee6 14%bcond_with tests # check target
a18955a2 15
9d4c03c0 16%ifnarch %{ix86} %{x8664} x32 aarch64 %{arm}
a18955a2
ER
17%undefine with_gold
18%endif
b27362de
JP
19%ifarch %{arm}
20%undefine with_gasp
21%endif
4a5e8616
JP
22%ifnarch %{ix86} %{x8664} aarch64
23%undefine with_gprofng 1
24%endif
a18955a2 25
58a689fe 26Summary: GNU Binary Utility Development Utilities
ceb5138c
ER
27Summary(de.UTF-8): GNU Binary Utility Development Utilities
28Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU
29Summary(fr.UTF-8): Utilitaires de développement binaire de GNU
30Summary(pl.UTF-8): Narzędzia GNU dla programistów
31Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU
32Summary(ru.UTF-8): Набор инструментов GNU для построения исполняемых программ
33Summary(tr.UTF-8): GNU geliştirme araçları
34Summary(uk.UTF-8): Набір інструментів GNU для побудови виконуваних програм
58a689fe 35Name: binutils
4a5e8616
JP
36Version: 2.39
37Release: 1
d4e8849a 38Epoch: 4
0f5b7b0a 39License: GPL v3+
58a689fe 40Group: Development/Tools
497cb22d 41Source0: https://ftp.gnu.org/gnu/binutils/%{name}-%{version}.tar.lz
4a5e8616 42# Source0-md5: 061a1460a09cc71e51886c008be55d44
ab9f8866 43Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
e866ad8f 44# Source1-md5: a717d9707ec77d82acb6ec9078c472d6
2859501d 45Patch0: %{name}-gasp.patch
f0309959 46Patch1: %{name}-info.patch
fb2b373b
JB
47Patch2: %{name}-libtool-relink.patch
48Patch3: %{name}-pt_pax_flags.patch
b6853af5 49
3ecba8d9
AM
50Patch6: %{name}-absolute-gnu_debuglink-path.patch
51Patch7: %{name}-libtool-m.patch
3ecba8d9 52Patch9: %{name}-tooldir.patch
cb066d97 53Patch10: %{name}-sanity-check.patch
57d29c3f 54URL: http://www.sourceware.org/binutils/
6520cf64 55BuildRequires: autoconf >= 2.69
08f839ed 56BuildRequires: automake >= 1:1.11
92b879dd 57BuildRequires: bison
4770b19c 58BuildRequires: flex
0d071cd5 59BuildRequires: gettext-tools
4a5e8616 60%{?with_jansson:BuildRequires: jansson-devel}
a18955a2 61%{?with_gold:BuildRequires: libstdc++-devel >= 6:4.0-1}
31c98541 62%{?with_tests:BuildRequires: libstdc++-static >= 6:4.0}
fdba1a35 63BuildRequires: lzip
4a5e8616 64%{?with_msgpack:BuildRequires: msgpack-devel}
3aee031d 65BuildRequires: perl-tools-pod
4a5e8616
JP
66BuildRequires: pkgconfig
67BuildRequires: rpmbuild(macros) >= 1.527
c1a8e558 68%ifarch sparc sparc32
69BuildRequires: sparc32
70%endif
3bc4b8d1 71BuildRequires: tar >= 1:1.22
e6b8978d 72BuildRequires: texinfo >= 4.2
d9b61f00 73BuildRequires: zlib-devel
5905b48e 74%{?with_tests:BuildRequires: zlib-static}
74cc5371 75Conflicts: gcc-c++ < 5:3.3
bc650d31 76Conflicts: modutils < 2.4.17
98051ac9 77Conflicts: rpmbuild(macros) < 1.660
08d99624 78Obsoletes: binutils-gold
59f56279 79BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
1928db7d 80
81%description
948596dc 82Binutils is a collection of binary utilities, including:
83- ar - create, modify and extract from archives,
84- nm - lists symbols from object files,
85- objcopy - copy and translate object files,
86- objdump - display information from object files,
87- ranlib - generate an index for the contents of an archive,
88- size - list the section sizes of an object or archive file,
89- strings - list printable strings from files,
90- strip - discard symbols,
34f46dd1 91- addr2line - convert addresses to file and line.
1928db7d 92
0c3d68f2
JR
93%description -l es.UTF-8
94Binutils es una colección de utilitarios necesarios para compilar
95programas. Incluye assembler y linker, así como varios otros programas
eaa0ca5c 96para trabajar con formatos que se puedan ejecutar.
97
0c3d68f2
JR
98%description -l pl.UTF-8
99Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację
100programów. Znajdują się tutaj między innymi assembler, konsolidator
101(linker), a także inne narzędzia do manipulowania binarnymi plikami
102programów i bibliotek.
1928db7d 103
0c3d68f2
JR
104%description -l pt_BR.UTF-8
105binutils é uma coletânea de utilitários necessários para compilar
106programas. Inclui assembler e linker, assim como vários outros
107programas para trabalhar com formatos executáveis.
54b53cb0 108
0c3d68f2
JR
109%description -l ru.UTF-8
110binutils - это набор инструментов, необходимых для компилляции
111программ. Включает ассемблер, компоновщик и набор других программ для
112работы с исполняемыми файлами разнообразных форматов.
c5304b32 113
0c3d68f2
JR
114%description -l uk.UTF-8
115binutils - це набір інструментів, необхідних для компіляції програм.
116Містить асемблер, компоновщик та інші програми, необхідні для роботи з
117виконуваними файлами різних форматів.
c5304b32 118
49b19461
JB
119%package libs
120Summary: GNU binutils shared libraries
ceb5138c 121Summary(pl.UTF-8): Biblioteki współdzielone GNU binutils
49b19461 122Group: Libraries
40e06b51 123Conflicts: binutils < 3:2.17.50.0.8-3
49b19461
JB
124
125%description libs
126GNU binutils shared libraries (libbfd, libopcodes).
127
0c3d68f2
JR
128%description libs -l pl.UTF-8
129Biblioteki współdzielone GNU binutils (libbfd, libopcodes).
49b19461
JB
130
131%package devel
132Summary: Development files for GNU binutils libraries
ceb5138c 133Summary(pl.UTF-8): Pliki programistyczne bibliotek GNU binutils
49b19461
JB
134Group: Development/Libraries
135Requires: %{name}-libs = %{epoch}:%{version}-%{release}
136
137%description devel
5516fb05
ER
138Development files for GNU binutils libraries (libbfd, libopcodes) and
139static libiberty library.
49b19461 140
0c3d68f2 141%description devel -l pl.UTF-8
49b19461
JB
142Pliki programistyczne bibliotek GNU binutils (libbfd, libopcodes) oraz
143statyczna biblioteka libiberty.
144
16317b98 145%package static
49b19461 146Summary: GNU binutils static libraries
ceb5138c 147Summary(pl.UTF-8): Biblioteki statyczne do GNU binutils
a26dabf1 148Group: Development/Libraries
49b19461 149Requires: %{name}-devel = %{epoch}:%{version}-%{release}
461931c7 150#Requires: zlib-static
a806649c 151
152%description static
49b19461 153Static GNU binutils libraries (libbfd, libopcodes).
a806649c 154
0c3d68f2 155%description static -l pl.UTF-8
49b19461 156Biblioteki statyczne GNU binutils (libbfd, libopcodes).
a806649c 157
2859501d
JB
158%package gasp
159Summary: GASP - old preprocessor for assembly programs
ceb5138c 160Summary(pl.UTF-8): GASP - stary preprocesor dla programów w asemblerze
2859501d 161Group: Development/Tools
a8538388 162Requires: %{name} = %{epoch}:%{version}-%{release}
2859501d
JB
163
164%description gasp
165GASP - old preprocessor for assembly programs. It's officially
166obsoleted, but it's still needed to build some packages.
167
0c3d68f2
JR
168%description gasp -l pl.UTF-8
169GASP - stary preprocesor dla programów w asemblerze. Jest oficjalnie
170uznany za przestarzały, ale jest nadal potrzebny do zbudowania
171niektórych pakietów.
2859501d 172
1928db7d 173%prep
501f7670 174%setup -q
39af79f4 175%{?with_gasp:%patch0 -p1}
f81d2489 176%patch1 -p1
f0309959 177%patch2 -p1
ae2b8d9d 178%{?with_pax:%patch3 -p1}
b6853af5 179
8c2c8b6f 180%patch6 -p1
3cd495cf 181%patch7 -p1
8dd9627c 182%patch9 -p1
cb066d97 183%patch10 -p1
4a5e8616
JP
184
185%{__sed} -i -e '1s,.*env perl,#!%{__perl},' gprofng/gp-display-html/gp-display-html.in
1928db7d 186
6520cf64 187# file contains hacks for ac 2.69 only
5cfae0d2 188%{__rm} config/override.m4
bfa6591a 189
1928db7d 190%build
437f76a6 191%{__aclocal}
192%{__autoconf}
193
a8538388 194# non-standard regeneration (needed because of gasp patch)
fe27c565 195# AM_BINUTILS_WARNINGS in bfd/warning.m4, ZW_GNU_GETTEXT_SISTER_DIR in config/gettext-sister.m4
71ec0766
AM
196for dir in gas bfd; do
197 cd $dir || exit 1
4274db7b
AM
198 %{__aclocal} -I .. -I ../config -I ../bfd
199 %{__automake} Makefile
8d67b114 200 test -f doc/Makefile.am && %{__automake} doc/Makefile
4274db7b 201 %{__autoconf}
71ec0766
AM
202 cd ..
203done
266c72dc 204
3cc4a1c4
AM
205# More targets
206TARGETS=
207%ifarch ia64
208TARGETS=i686-linux
209%endif
501f7670 210# uhm?
3cc4a1c4
AM
211%ifarch %{ix86}
212TARGETS=x86_64-linux
213%endif
214%ifarch sparc
215TARGETS=sparc64-linux
216%endif
1fb376d7 217%ifarch %{x8664}
3c26908e
JK
218TARGETS="x86_64-pep"
219%endif
39a25667
JR
220%ifarch x32
221TARGETS="x86_64-linux,x86_64-pep"
222%endif
501f7670 223%{?addtargets:TARGETS="%{addtargets}"}
3cc4a1c4 224
bc650d31 225cp -f /usr/share/automake/config.* .
e1177480 226CFLAGS="%{rpmcflags}"; export CFLAGS
1530b74b 227CXXFLAGS="%{rpmcxxflags}"; export CXXFLAGS
bc650d31 228CC="%{__cc}"; export CC
1530b74b 229CXX="%{__cxx}"; export CXX
c5304b32 230%ifarch sparc
8a52c890 231sparc32 \
232%endif
1e19fd88 233./configure %{_target_platform} \
1e19fd88 234 --prefix=%{_prefix} \
a74f9904 235 --libdir=%{_libdir} \
1e19fd88 236 --infodir=%{_infodir} \
c1bfddd6 237 --mandir=%{_mandir} \
4a5e8616 238 --sysconfdir=%{_sysconfdir} \
fdba1a35 239 --disable-debug \
ef1f18fc 240 --disable-silent-rules \
fdba1a35 241 --disable-werror \
c446d5a3 242%ifarch sparc
ab151dc7 243 --enable-64-bit-bfd \
501f7670
JB
244%else
245 %{?with_allarchs:--enable-64-bit-bfd} \
c446d5a3 246%endif
fdba1a35
JB
247 --enable-build-warnings=,-Wno-missing-prototypes \
248 --enable-install-libiberty \
249 --enable-lto \
250 --enable-plugins \
251 --enable-shared \
39a25667 252 %{?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} \
fdba1a35
JB
253 %{!?with_allarchs:`[ -n "${TARGETS}" ] && echo "--enable-targets=${TARGETS}"`} \
254 --with-tooldir=%{_prefix} \
255 --with-zlib \
a18955a2 256%if %{with gold}
93de8f98 257 --enable-gold%{!?with_default_bfd:=default} --enable-ld%{?with_default_bfd:=default} \
41248ac5 258%endif
4a5e8616
JP
259 %{__enable_disable msgpack} \
260 %{__enable_disable jansson}
58a689fe 261
8c2886ad 262%{__make}
1928db7d 263
1665df93 264%{?with_tests:%{__make} -j1 check}
e6026cea 265
1928db7d 266%install
267rm -rf $RPM_BUILD_ROOT
f0caedc5 268install -d $RPM_BUILD_ROOT%{_libdir}/bfd-plugins
58a689fe 269
8c2886ad 270%{__make} -j1 install \
437f76a6 271 DESTDIR=$RPM_BUILD_ROOT
1928db7d 272
3f010e6c 273# remove these man pages unless we cross-build for win*/netware platforms.
274# however, this should be done in Makefiles.
1770ca50 275%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,windmc,windres}.1
3f010e6c 276
bc650d31 277bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
3f010e6c 278
fdba1a35
JB
279# overwrite libiberty.a with PIC version
280cp -pf libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
1928db7d 281
3aee031d
JB
282# remove evil -L pointing inside builder's home
283perl -pi -e 's@-L[^ ]*/pic @@g' $RPM_BUILD_ROOT%{_libdir}/libbfd.la
284
16885b7f 285[ -x $RPM_BUILD_ROOT%{_bindir}/ld.bfd ] || ln $RPM_BUILD_ROOT%{_bindir}/ld{,.bfd}
286
ab025e6a
ER
287rm -f $RPM_BUILD_ROOT%{_infodir}/dir
288
5d312d05
JP
289%if %{with gold}
290install -d gold-doc
291cp -p gold/{README,ChangeLog,TODO} gold-doc
292%endif
293
49b19461
JB
294%find_lang bfd
295%find_lang binutils
296%find_lang gas
297%find_lang gprof
a18955a2 298touch ld.lang gold.lang
49b19461 299%find_lang ld
a18955a2 300%if %{with gold}
9dedc7ea 301%find_lang gold
1addeff3 302%endif
49b19461 303%find_lang opcodes
632dfa0c 304cat bfd.lang opcodes.lang > %{name}-libs.lang
08d99624 305cat gas.lang gprof.lang ld.lang gold.lang >> %{name}.lang
bc650d31 306
1928db7d 307%clean
308rm -rf $RPM_BUILD_ROOT
309
bfa6591a 310%post -p /sbin/postshell
c3790715 311-/usr/sbin/fix-info-dir -c %{_infodir}
1928db7d 312
bfa6591a 313%postun -p /sbin/postshell
c3790715 314-/usr/sbin/fix-info-dir -c %{_infodir}
49b19461
JB
315
316%post libs -p /sbin/ldconfig
317%postun libs -p /sbin/ldconfig
318
bfa6591a 319%post devel -p /sbin/postshell
5ff961d5 320-/usr/sbin/fix-info-dir -c %{_infodir}
49b19461 321
bfa6591a 322%postun devel -p /sbin/postshell
5ff961d5 323-/usr/sbin/fix-info-dir -c %{_infodir}
1928db7d 324
9b8eb19f
ER
325%post gasp -p /sbin/postshell
326-/usr/sbin/fix-info-dir -c %{_infodir}
327
328%postun gasp -p /sbin/postshell
329-/usr/sbin/fix-info-dir -c %{_infodir}
330
bc650d31 331%files -f %{name}.lang
58a689fe 332%defattr(644,root,root,755)
dc044c3b 333%doc README
5d312d05 334%{?with_gold:%doc gold-doc}
4a5e8616 335%{?with_gprofng:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/gprofng.rc}
41248ac5
JB
336%attr(755,root,root) %{_bindir}/addr2line
337%attr(755,root,root) %{_bindir}/ar
338%attr(755,root,root) %{_bindir}/as
339%attr(755,root,root) %{_bindir}/c++filt
340%attr(755,root,root) %{_bindir}/elfedit
4a5e8616
JP
341%if %{with gprofng}
342%attr(755,root,root) %{_bindir}/gp-archive
343%attr(755,root,root) %{_bindir}/gp-collect-app
344%attr(755,root,root) %{_bindir}/gp-display-html
345%attr(755,root,root) %{_bindir}/gp-display-src
346%attr(755,root,root) %{_bindir}/gp-display-text
347%attr(755,root,root) %{_bindir}/gprofng
348%endif
41248ac5
JB
349%attr(755,root,root) %{_bindir}/gprof
350%attr(755,root,root) %{_bindir}/ld
351%attr(755,root,root) %{_bindir}/ld.bfd
a18955a2 352%if %{with gold}
08d99624 353%attr(755,root,root) %{_bindir}/ld.gold
3bc4b8d1 354%attr(755,root,root) %{_bindir}/dwp
1addeff3 355%endif
41248ac5
JB
356%attr(755,root,root) %{_bindir}/nm
357%attr(755,root,root) %{_bindir}/objcopy
358%attr(755,root,root) %{_bindir}/objdump
359%attr(755,root,root) %{_bindir}/ranlib
360%attr(755,root,root) %{_bindir}/readelf
361%attr(755,root,root) %{_bindir}/size
362%attr(755,root,root) %{_bindir}/strings
363%attr(755,root,root) %{_bindir}/strip
4a5e8616
JP
364%if %{with gprofng}
365%dir %{_libdir}/gprofng
366%attr(755,root,root) %{_libdir}/gprofng/libgp-collector.so
367%attr(755,root,root) %{_libdir}/gprofng/libgp-collectorAPI.so
368%attr(755,root,root) %{_libdir}/gprofng/libgp-heap.so
369%attr(755,root,root) %{_libdir}/gprofng/libgp-iotrace.so
370%attr(755,root,root) %{_libdir}/gprofng/libgp-sync.so
371%attr(755,root,root) %{_libdir}/gprofng/libgprofng.so.*.*.*
372%attr(755,root,root) %{_libdir}/gprofng/libgprofng.so.0
373%endif
f0caedc5 374%{_prefix}/lib/ldscripts
49b19461
JB
375%{_infodir}/as.info*
376%{_infodir}/binutils.info*
8d67b114 377%{_infodir}/ctf-spec.info*
49b19461 378%{_infodir}/gprof.info*
4a5e8616 379%{?with_gprofng:%{_infodir}/gprofng.info*}
49b19461 380%{_infodir}/ld.info*
f0caedc5
JB
381%{_mandir}/man1/addr2line.1*
382%{_mandir}/man1/ar.1*
383%{_mandir}/man1/as.1*
384%{_mandir}/man1/c++filt.1*
385%{_mandir}/man1/elfedit.1*
4a5e8616
JP
386%if %{with gprofng}
387%{_mandir}/man1/gp-archive.*
388%{_mandir}/man1/gp-collect-app.*
389%{_mandir}/man1/gp-display-html.*
390%{_mandir}/man1/gp-display-src.*
391%{_mandir}/man1/gp-display-text.*
392%{_mandir}/man1/gprofng.1*
393%endif
f0caedc5
JB
394%{_mandir}/man1/gprof.1*
395%{_mandir}/man1/ld.1*
396%{_mandir}/man1/nm.1*
397%{_mandir}/man1/objcopy.1*
398%{_mandir}/man1/objdump.1*
399%{_mandir}/man1/ranlib.1*
400%{_mandir}/man1/readelf.1*
401%{_mandir}/man1/size.1*
402%{_mandir}/man1/strings.1*
403%{_mandir}/man1/strip.1*
3f010e6c 404%lang(cs) %{_mandir}/cs/man1/*
405%lang(de) %{_mandir}/de/man1/*
406%lang(es) %{_mandir}/es/man1/*
407%lang(fi) %{_mandir}/fi/man1/*
408%lang(fr) %{_mandir}/fr/man1/*
409%lang(hu) %{_mandir}/hu/man1/*
410%lang(ja) %{_mandir}/ja/man1/*
411%lang(pl) %{_mandir}/pl/man1/*
1928db7d 412
49b19461
JB
413%files libs -f %{name}-libs.lang
414%defattr(644,root,root,755)
5239e4f9 415%attr(755,root,root) %{_libdir}/libbfd-%{version}.so
ab38b0a4
AM
416%attr(755,root,root) %{_libdir}/libctf.so.*.*
417%attr(755,root,root) %ghost %{_libdir}/libctf.so.0
418%attr(755,root,root) %{_libdir}/libctf-nobfd.so.*.*
419%attr(755,root,root) %ghost %{_libdir}/libctf-nobfd.so.0
5239e4f9 420%attr(755,root,root) %{_libdir}/libopcodes-%{version}.so
f0caedc5 421%dir %{_libdir}/bfd-plugins
8c2886ad 422%attr(755,root,root) %{_libdir}/bfd-plugins/libdep.so
49b19461
JB
423
424%files devel
425%defattr(644,root,root,755)
426%attr(755,root,root) %{_libdir}/libbfd.so
ab38b0a4
AM
427%attr(755,root,root) %{_libdir}/libctf.so
428%attr(755,root,root) %{_libdir}/libctf-nobfd.so
49b19461 429%attr(755,root,root) %{_libdir}/libopcodes.so
4a5e8616 430%{?with_gprofng:%attr(755,root,root) %{_libdir}/gprofng/libgprofng.so}
49b19461 431%{_libdir}/libbfd.la
ab38b0a4
AM
432%{_libdir}/libctf.la
433%{_libdir}/libctf-nobfd.la
49b19461
JB
434%{_libdir}/libopcodes.la
435%{_libdir}/libiberty.a
41248ac5
JB
436%{_includedir}/ansidecl.h
437%{_includedir}/bfd.h
438%{_includedir}/bfdlink.h
ab38b0a4
AM
439%{_includedir}/ctf-api.h
440%{_includedir}/ctf.h
1770ca50 441%{_includedir}/diagnostics.h
41248ac5 442%{_includedir}/dis-asm.h
fb9adfdf 443%{_includedir}/plugin-api.h
41248ac5 444%{_includedir}/symcat.h
fdba1a35 445%{_includedir}/libiberty
4a5e8616
JP
446%if %{with gprofng}
447%{_includedir}/collectorAPI.h
448%{_includedir}/libcollector.h
449%{_includedir}/libfcollector.h
450%endif
49b19461
JB
451%{_infodir}/bfd.info*
452
a806649c 453%files static
8d8a6b9c 454%defattr(644,root,root,755)
49b19461 455%{_libdir}/libbfd.a
ab38b0a4
AM
456%{_libdir}/libctf.a
457%{_libdir}/libctf-nobfd.a
49b19461 458%{_libdir}/libopcodes.a
2859501d 459
39af79f4 460%if %{with gasp}
2859501d
JB
461%files gasp
462%defattr(644,root,root,755)
463%attr(755,root,root) %{_bindir}/gasp
464%{_infodir}/gasp.info*
39af79f4 465%endif
This page took 0.149574 seconds and 4 git commands to generate.