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