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