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