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