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