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