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