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