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