1 |
|
2 |
%define lib_major 2 |
3 |
%define lib_name_orig %{package_prefix}%mklibname binutils |
4 |
%define lib_name %{lib_name_orig}%{lib_major} |
5 |
%define dev_name %mklibname binutils -d |
6 |
|
7 |
# Allow SPU support for native PowerPC arches, not cross env packages |
8 |
%define spu_arches ppc ppc64 |
9 |
|
10 |
# Define if building a cross-binutils |
11 |
%define build_cross 0 |
12 |
%{expand: %{?cross: %%global build_cross 1}} |
13 |
|
14 |
%if %{build_cross} |
15 |
%define target_cpu %{cross} |
16 |
%define target_platform %{target_cpu}-%_real_vendor-linux%{gnuext} |
17 |
%if "%{target_cpu}" == "spu" |
18 |
%define target_platform %{target_cpu}-unknown-elf |
19 |
%endif |
20 |
%define program_prefix %{target_platform}- |
21 |
%define package_prefix cross-%{target_cpu}- |
22 |
%else |
23 |
%define target_cpu %{_target_cpu} |
24 |
%define target_platform %{_target_platform} |
25 |
%define program_prefix %{nil} |
26 |
%define package_prefix %{nil} |
27 |
%endif |
28 |
|
29 |
%define arch %(echo %{target_cpu}|sed -e "s/\(i.86\|athlon\)/i386/" -e "s/amd64/x86_64/" -e "s/\(sun4.*\|sparcv[89]\)/sparc/") |
30 |
%define isarch() %(case " %* " in (*" %{arch} "*) echo 1;; (*) echo 0;; esac) |
31 |
|
32 |
%if %{build_cross} |
33 |
%if %isarch %arm |
34 |
%define gnuext -gnueabi |
35 |
%else |
36 |
%if "%{target_cpu}" == "spu" |
37 |
%define gnuext %{nil} |
38 |
%else |
39 |
%define gnuext -gnu |
40 |
%endif |
41 |
%endif |
42 |
%endif |
43 |
|
44 |
# List of targets where gold can be enabled |
45 |
%define gold_arches %{ix86} x86_64 ppc ppc64 %{sparc} %{arm} |
46 |
|
47 |
Summary: GNU Binary Utility Development Utilities |
48 |
Name: %{package_prefix}binutils |
49 |
# (tmb) NOTE! Fedora does use a faked 2.23.88.*.* versioning to handle the version |
50 |
# downgrade but I dont see the point as Epoch is created for just this purpose |
51 |
Epoch: 1 |
52 |
Version: 2.24 |
53 |
%define subrel 1 |
54 |
Release: %mkrel 12 |
55 |
License: GPLv3+ |
56 |
Group: Development/Other |
57 |
URL: http://sources.redhat.com/binutils/ |
58 |
Source0: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2 |
59 |
Source1: build_cross_binutils.sh |
60 |
Source2: spu_ovl.o |
61 |
Source3: embedspu.sh |
62 |
Source4: binutils-2.19.50.0.1-output-format.sed |
63 |
%if "%{name}" == "binutils" |
64 |
Requires(post): info-install |
65 |
Requires(preun):info-install |
66 |
Provides: %{lib_name} = %{epoch}:%{version}-%{release} |
67 |
%endif |
68 |
# (tmb) force build with gcc 4.9.2 |
69 |
BuildRequires: gcc >= 4.9.2 |
70 |
BuildRequires: autoconf |
71 |
BuildRequires: automake |
72 |
BuildRequires: bison |
73 |
BuildRequires: flex |
74 |
BuildRequires: gettext |
75 |
BuildRequires: texinfo-tex |
76 |
BuildRequires: dejagnu |
77 |
BuildRequires: zlib-devel |
78 |
# make check'ing requires libdl.a |
79 |
BuildRequires: glibc-static-devel |
80 |
# gold make check'ing requires libstdc++.a |
81 |
BuildRequires: libstdc++-static-devel |
82 |
|
83 |
# Fedora patches: |
84 |
Patch01: binutils-2.20.51.0.2-libtool-lib64.patch |
85 |
Patch02: binutils-2.20.51.0.10-ppc64-pie.patch |
86 |
Patch03: binutils-2.20.51.0.2-ia64-lib64.patch |
87 |
# We don't want this one! |
88 |
# Patch04: binutils-2.20.51.0.2-version.patch |
89 |
Patch05: binutils-2.20.51.0.2-set-long-long.patch |
90 |
Patch06: binutils-2.20.51.0.10-copy-osabi.patch |
91 |
Patch07: binutils-2.20.51.0.10-sec-merge-emit.patch |
92 |
# Enable -zrelro by default: BZ #621983 |
93 |
Patch08: binutils-2.22.52.0.1-relro-on-by-default.patch |
94 |
# Local patch - export demangle.h with the binutils-devel rpm. |
95 |
Patch09: binutils-2.22.52.0.1-export-demangle.h.patch |
96 |
# Disable checks that config.h has been included before system headers. BZ #845084 |
97 |
Patch10: binutils-2.22.52.0.4-no-config-h-check.patch |
98 |
# Fix addr2line to use the dynamic symbol table if it could not find any ordinary symbols. |
99 |
Patch13: binutils-2.23.52.0.1-addr2line-dynsymtab.patch |
100 |
# |
101 |
Patch16: binutils-2.23.2-kernel-ld-r.patch |
102 |
# Correct bug introduced by patch 16 |
103 |
Patch19: binutils-2.23.2-aarch64-em.patch |
104 |
# Fix decoding of abstract instance names using DW_FORM_ref_addr. |
105 |
Patch20: binutils-2.24-DW_FORM_ref_addr.patch |
106 |
# Fix detections of uncompressed .debug_str sections that look like they have been compressed. |
107 |
Patch21: binutils-2.24-fake-zlib-sections.patch |
108 |
Patch22: binutils-2.24-fat-lto-objects.patch |
109 |
Patch23: binutils-2.24-symbol-warning.patch |
110 |
Patch26: binutils-HEAD-change-ld-notice-interface.patch |
111 |
Patch27: binutils-2.24-corrupt-binaries.patch |
112 |
Patch28: binutils-2.24-strings-default-all.patch |
113 |
Patch29: binutils-2.24-corrupt-ar.patch |
114 |
|
115 |
# Mageia patches |
116 |
# TODO: should really clean up this patch again now... |
117 |
Patch51: binutils-2.24-linux32.patch |
118 |
Patch52: binutils-2.24-skip-gold-check.patch |
119 |
# (cjw) fix ar crashing when a plugin is used, caused by patch16 |
120 |
Patch53: binutils-2.24-ar-segfault.patch |
121 |
|
122 |
# upstream fixes |
123 |
Patch100: binutils-bfd-elflink-Fix-as-needed-undefined-symbol-references-from-dynam.patch |
124 |
Patch101: binutils-bfd-Correct-elf_merge_st_other-arguments-for-weak-symbols.patch |
125 |
Patch102: binutils-Fix-buffer-underrun-in-i386-dis.c.patch |
126 |
Patch103: binutils-Add-missing-break-statement-for-case-elfcpp-R_X86_64.patch |
127 |
# fix gcc 4.9 build, should be the same as binutils-2.24-set-section-macros.patch in fedora |
128 |
Patch104: mingw-binutils-warnings.patch |
129 |
# Part of upstream patch for upstream #17533 / CVE-2014-8738 that is missing from patch29 |
130 |
# https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=patch;h=bb0d867169d7e9743d229804106a8fbcab7f3b3f |
131 |
Patch105: binutils-2.24-17533.patch |
132 |
|
133 |
Patch200: CVE-2016-2226.patch |
134 |
Patch201: CVE-2016-4487.patch |
135 |
Patch202: CVE-2016-4488.patch |
136 |
Patch203: CVE-2016-4489.patch |
137 |
Patch204: CVE-2016-4490-1.patch |
138 |
Patch205: CVE-2016-4490-2.patch |
139 |
Patch206: CVE-2016-4492_CVE-2016-4493.patch |
140 |
Patch207: CVE-2016-6131.patch |
141 |
Patch208: CVE-2016-XXXX.patch |
142 |
Patch209: binutils-2.25-CVE-2017-6969-part1.patch |
143 |
Patch210: binutils-2.25-CVE-2017-6969-part2.patch |
144 |
Patch211: binutils-2.25-CVE-2017-7210.patch |
145 |
|
146 |
%description |
147 |
Binutils is a collection of binary utilities, including: |
148 |
|
149 |
* ar: creating modifying and extracting from archives |
150 |
* nm: for listing symbols from object files |
151 |
* objcopy: for copying and translating object files |
152 |
* objdump: for displaying information from object files |
153 |
* ranlib: for generating an index for the contents of an archive |
154 |
* size: for listing the section sizes of an object or archive file |
155 |
* strings: for listing printable strings from files |
156 |
* strip: for discarding symbols (a filter for demangling encoded C++ symbols |
157 |
* addr2line: for converting addresses to file and line |
158 |
* nlmconv: for converting object code into an NLM |
159 |
|
160 |
Install binutils if you need to perform any of these types of actions on |
161 |
binary files. Most programmers will want to install binutils. |
162 |
|
163 |
%ifarch %{spu_arches} |
164 |
%package -n spu-binutils |
165 |
Summary: GNU Binary Utility Development Utilities for Cell SPU |
166 |
Group: Development/Other |
167 |
|
168 |
%description -n spu-binutils |
169 |
This package contains the binutils with Cell SPU support. |
170 |
%endif |
171 |
|
172 |
%package -n %{dev_name} |
173 |
Summary: Main library for %{name} |
174 |
Group: Development/Other |
175 |
Provides: %{name}-devel = %{epoch}:%{version}-%{release} |
176 |
Provides: %{lib_name}-devel = %{epoch}:%{version}-%{release} |
177 |
Requires: zlib-devel |
178 |
|
179 |
%description -n %{dev_name} |
180 |
This package contains BFD and opcodes static libraries and associated |
181 |
header files. Only *.a libraries are included, because BFD doesn't |
182 |
have a stable ABI. Developers starting new projects are strongly encouraged |
183 |
to consider using libelf instead of BFD. |
184 |
|
185 |
%prep |
186 |
%setup -q -n binutils-%{version} |
187 |
# Fedora patches: |
188 |
%patch01 -p0 -b .libtool-lib64~ |
189 |
%patch02 -p0 -b .ppc64-pie~ |
190 |
%ifarch ia64 |
191 |
%if "%{_lib}" == "lib64" |
192 |
%patch03 -p0 -b .ia64-lib64~ |
193 |
%endif |
194 |
%endif |
195 |
# We don't want this one! |
196 |
#patch04 -p0 -b .version~ |
197 |
%patch05 -p0 -b .set-long-long~ |
198 |
%patch06 -p0 -b .copy-osabi~ |
199 |
%patch07 -p0 -b .sec-merge-emit~ |
200 |
%patch08 -p0 -b .relro-by-default~ |
201 |
%patch09 -p0 -b .demangle~ |
202 |
%patch10 -p0 -b .config-h-check~ |
203 |
%patch13 -p0 -b .addr2line~ |
204 |
%patch16 -p0 -b .kernel-ld-r~ |
205 |
%patch19 -p0 -b .aarch64~ |
206 |
%patch20 -p0 -b .ref-addr~ |
207 |
%patch21 -p0 -b .fake-zlib~ |
208 |
%patch22 -p1 -b .fatlto~ |
209 |
%patch23 -p1 -b .symwarn~ |
210 |
%patch26 -p1 -b .ldplugin~ |
211 |
%patch27 -p0 -b .corrupt-binaries~ |
212 |
%patch28 -p0 -b .strings-all~ |
213 |
%patch29 -p0 -b .corrupt-ar~ |
214 |
|
215 |
# Mageia patches |
216 |
%patch51 -p1 -b .linux32~ |
217 |
%patch52 -p1 -b .skip_gold_check~ |
218 |
%patch53 -p1 -b .ar-segfault |
219 |
|
220 |
# upstream fixes |
221 |
%patch100 -p1 -b .elflink |
222 |
%patch101 -p1 -b .elflink-weak |
223 |
%patch102 -p1 -b .p102 |
224 |
%patch103 -p1 -b .p103 |
225 |
%patch104 -p1 -b .werror |
226 |
%patch105 -p1 -b .CVE-2014-8738 |
227 |
|
228 |
%patch200 -p1 |
229 |
%patch201 -p1 |
230 |
%patch202 -p1 |
231 |
%patch203 -p1 |
232 |
%patch204 -p1 |
233 |
%patch205 -p1 |
234 |
%patch206 -p1 |
235 |
%patch207 -p1 |
236 |
%patch208 -p1 |
237 |
%patch209 -p1 |
238 |
%patch210 -p1 |
239 |
%patch211 -p1 |
240 |
|
241 |
# for boostrapping, can be rebuilt afterwards in --enable-maintainer-mode |
242 |
cp %{SOURCE2} ld/emultempl/ |
243 |
|
244 |
%build |
245 |
# Additional targets |
246 |
ADDITIONAL_TARGETS="" |
247 |
case %{target_cpu} in |
248 |
ppc | powerpc) |
249 |
ADDITIONAL_TARGETS="powerpc64-%{_target_vendor}-%{_target_os}" |
250 |
;; |
251 |
ppc64) |
252 |
ADDITIONAL_TARGETS="" |
253 |
;; |
254 |
ia64) |
255 |
ADDITIONAL_TARGETS="i586-%{_target_vendor}-%{_target_os}" |
256 |
;; |
257 |
i*86 | athlon*) |
258 |
ADDITIONAL_TARGETS="x86_64-%{_target_vendor}-%{_target_os}" |
259 |
;; |
260 |
sparc*) |
261 |
ADDITIONAL_TARGETS="sparc64-%{_target_vendor}-%{_target_os}" |
262 |
;; |
263 |
mipsel*) |
264 |
ADDITIONAL_TARGETS="mips64el-%{_target_vendor}-%{_target_os},mips32el-%{_target_vendor}-%{_target_os}" |
265 |
;; |
266 |
mips) |
267 |
ADDITIONAL_TARGETS="mips64-%{_target_vendor}-%{_target_os}" |
268 |
;; |
269 |
esac |
270 |
%ifarch %{spu_arches} |
271 |
if [[ -n "$ADDITIONAL_TARGETS" ]]; then |
272 |
ADDITIONAL_TARGETS="$ADDITIONAL_TARGETS,spu-unknown-elf" |
273 |
else |
274 |
ADDITIONAL_TARGETS="spu-unknown-elf" |
275 |
fi |
276 |
%endif |
277 |
if [[ -n "$ADDITIONAL_TARGETS" ]]; then |
278 |
TARGET_CONFIG="$TARGET_CONFIG --enable-targets=$ADDITIONAL_TARGETS" |
279 |
fi |
280 |
|
281 |
case %{target_cpu} in |
282 |
ppc | powerpc | i*86 | athlon* | sparc* | mips*) |
283 |
TARGET_CONFIG="$TARGET_CONFIG --enable-64-bit-bfd" |
284 |
;; |
285 |
esac |
286 |
|
287 |
%if "%{name}" != "binutils" |
288 |
%define _program_prefix %{program_prefix} |
289 |
TARGET_CONFIG="$TARGET_CONFIG --target=%{target_platform}" |
290 |
%endif |
291 |
|
292 |
# Don't build shared libraries in cross binutils |
293 |
%if "%{name}" == "binutils" |
294 |
TARGET_CONFIG="$TARGET_CONFIG --enable-shared --with-pic" |
295 |
%endif |
296 |
|
297 |
# Binutils comes with its own custom libtool |
298 |
# [gb] FIXME: but system libtool also works and has relink fix |
299 |
%define __libtoolize /bin/true |
300 |
|
301 |
# Build main binaries |
302 |
rm -rf objs |
303 |
mkdir objs |
304 |
pushd objs |
305 |
CONFIGURE_TOP=.. %configure2_5x $TARGET_CONFIG --with-bugurl=https://bugs.mageia.org/ \ |
306 |
--enable-gold \ |
307 |
--enable-plugins |
308 |
# There seems to be some problems with builds of gold randomly failing whenever |
309 |
# going through the build system, so let's try workaround this by trying to do |
310 |
# make once again when it happens... |
311 |
%make tooldir=%{_prefix} || make tooldir=%{_prefix} |
312 |
popd |
313 |
|
314 |
# Build alternate binaries (spu-gas in particular) |
315 |
case "$ADDITIONAL_TARGETS," in |
316 |
%ifarch %{spu_arches} |
317 |
*spu-*-elf,*) |
318 |
ALTERNATE_TARGETS="spu-unknown-elf" |
319 |
;; |
320 |
%endif |
321 |
*) |
322 |
;; |
323 |
esac |
324 |
if [[ -n "$ALTERNATE_TARGETS" ]]; then |
325 |
for target in $ALTERNATE_TARGETS; do |
326 |
cpu=`echo "$target" | sed -e "s/-.*//"` |
327 |
rm -rf objs-$cpu |
328 |
mkdir objs-$cpu |
329 |
pushd objs-$cpu |
330 |
CONFIGURE_TOP=.. %configure --enable-shared \ |
331 |
--target=$target \ |
332 |
--program-prefix=$cpu- \ |
333 |
--disable-werror \ |
334 |
--with-bugurl=https://bugs.mageia.org/ |
335 |
# make sure we use the fully built libbfd & libopcodes libs |
336 |
# XXX could have been simpler to just pass $ADDITIONAL_TARGETS |
337 |
# again to configure and rebuild all of those though... |
338 |
for dso in bfd opcodes; do |
339 |
%make all-$dso |
340 |
rm -f $dso/.libs/lib$dso-%{version}.so |
341 |
ln -s ../../../objs/$dso/.libs/lib$dso-%{version}.so $dso/.libs/ |
342 |
done |
343 |
%make all-binutils all-gas all-ld |
344 |
popd |
345 |
done |
346 |
fi |
347 |
|
348 |
%check |
349 |
# All Tests must pass on x86 and x86_64 |
350 |
# rtp: some ld-arm tests are failing. |
351 |
# they're fixed in 2.21 but didn't find the fixes |
352 |
echo ====================TESTING========================= |
353 |
%if %isarch i386 x86_64 ppc ppc64 spu |
354 |
%make -C objs check LDFLAGS="" || : |
355 |
# random build failures with gold seems to happen during check as well... |
356 |
make -k -C objs gold-check LDFLAGS="" || : |
357 |
[[ -d objs-spu ]] && \ |
358 |
%make -C objs-spu check-gas LDFLAGS="" || : |
359 |
%else |
360 |
%make -C objs -k check LDFLAGS="" || : |
361 |
%endif |
362 |
echo ====================TESTING END===================== |
363 |
|
364 |
logfile="%{name}-%{version}-%{release}.log" |
365 |
rm -f $logfile; find . -name "*.sum" | xargs cat >> $logfile |
366 |
|
367 |
%install |
368 |
mkdir -p $RPM_BUILD_ROOT%{_prefix} |
369 |
%makeinstall_std -C objs |
370 |
|
371 |
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windres}* |
372 |
rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
373 |
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la |
374 |
rm -f $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so |
375 |
|
376 |
%if "%{name}" == "binutils" |
377 |
make -C objs prefix=$RPM_BUILD_ROOT%{_prefix} infodir=$RPM_BUILD_ROOT%{_infodir} install-info |
378 |
install -m 644 include/libiberty.h $RPM_BUILD_ROOT%{_includedir}/ |
379 |
%if %isarch %mips |
380 |
install -m 644 objs/libiberty/libiberty.a $RPM_BUILD_ROOT%{_libdir}/ |
381 |
# Ship with the PIC libiberty |
382 |
%else |
383 |
install -m 644 objs/libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}/ |
384 |
%endif |
385 |
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{_target_platform}/ |
386 |
|
387 |
# Sanity check --enable-64-bit-bfd really works. |
388 |
%if %isarch ppc powerpc i*86 athlon* sparc* mips* |
389 |
grep '^#define BFD_ARCH_SIZE 64$' %{buildroot}%{_prefix}/include/bfd.h |
390 |
%endif |
391 |
|
392 |
# Fix multilib conflicts of generated values by __WORDSIZE-based expressions. |
393 |
%if %isarch %{ix86} x86_64 ppc ppc64 s390 s390x sh3 sh4 sparc sparc64 |
394 |
sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include <bits/wordsize.h>~;}' \ |
395 |
-e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \ |
396 |
-e 's/^#define BFD_HOST_64BIT_LONG [01] *$/#define BFD_HOST_64BIT_LONG (__WORDSIZE == 64)/' \ |
397 |
-e 's/^#define BFD_HOST_64_BIT \(long \)\?long *$/#if __WORDSIZE == 32\ |
398 |
#define BFD_HOST_64_BIT long long\ |
399 |
#else\ |
400 |
#define BFD_HOST_64_BIT long\ |
401 |
#endif/' \ |
402 |
-e 's/^#define BFD_HOST_U_64_BIT unsigned \(long \)\?long *$/#define BFD_HOST_U_64_BIT unsigned BFD_HOST_64_BIT/' \ |
403 |
%{buildroot}%{_prefix}/include/bfd.h |
404 |
%endif |
405 |
touch -r bfd/bfd-in2.h %{buildroot}%{_prefix}/include/bfd.h |
406 |
|
407 |
# Generate .so linker scripts for dependencies; imported from glibc/Makerules: |
408 |
|
409 |
# This fragment of linker script gives the OUTPUT_FORMAT statement |
410 |
# for the configuration we are building. |
411 |
OUTPUT_FORMAT="\ |
412 |
/* Ensure this .so library will not be used by a link for a different format |
413 |
on a multi-architecture system. */ |
414 |
$(gcc $CFLAGS $LDFLAGS -shared -x c /dev/null -o /dev/null -Wl,--verbose -v 2>&1 | sed -n -f "%{SOURCE4}")" |
415 |
|
416 |
tee %{buildroot}%{_libdir}/libbfd.so <<EOH |
417 |
/* GNU ld script */ |
418 |
|
419 |
$OUTPUT_FORMAT |
420 |
|
421 |
/* The libz dependency is unexpected by legacy build scripts. */ |
422 |
INPUT ( %{_libdir}/libbfd.a -liberty -lz ) |
423 |
EOH |
424 |
|
425 |
tee %{buildroot}%{_libdir}/libopcodes.so <<EOH |
426 |
/* GNU ld script */ |
427 |
|
428 |
$OUTPUT_FORMAT |
429 |
|
430 |
INPUT ( %{_libdir}/libopcodes.a -lbfd -lz ) |
431 |
EOH |
432 |
|
433 |
%else |
434 |
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a |
435 |
rm -rf $RPM_BUILD_ROOT%{_infodir} |
436 |
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ |
437 |
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_target_platform}/%{target_cpu}-linux/lib/*.la |
438 |
%endif |
439 |
|
440 |
%find_lang binutils |
441 |
%find_lang gas |
442 |
%find_lang ld |
443 |
%find_lang gold |
444 |
%find_lang gprof |
445 |
cat gas.lang >> binutils.lang |
446 |
cat ld.lang >> binutils.lang |
447 |
cat gold.lang>> binutils.lang |
448 |
cat gprof.lang >> binutils.lang |
449 |
|
450 |
%find_lang opcodes |
451 |
%find_lang bfd |
452 |
cat opcodes.lang >> binutils.lang |
453 |
cat bfd.lang >> binutils.lang |
454 |
|
455 |
# Alternate binaries |
456 |
[[ -d objs-spu ]] && { |
457 |
destdir=`mktemp -d` |
458 |
make -C objs-spu DESTDIR=$destdir install-binutils install-gas install-ld |
459 |
mv $destdir%{_bindir}/spu-* $RPM_BUILD_ROOT%{_bindir}/ |
460 |
mkdir -p $RPM_BUILD_ROOT%{_prefix}/spu/bin |
461 |
mv $destdir%{_prefix}/spu-unknown-elf/bin/* $RPM_BUILD_ROOT%{_prefix}/spu/bin/ |
462 |
rm -rf $destdir |
463 |
cat > $RPM_BUILD_ROOT%{_bindir}/ppu-as << EOF |
464 |
#!/bin/sh |
465 |
exec %{_bindir}/as -mcell -maltivec \${1+"\$@"} |
466 |
EOF |
467 |
chmod +x $RPM_BUILD_ROOT%{_bindir}/ppu-as |
468 |
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/embedspu |
469 |
} |
470 |
|
471 |
%if "%{name}" == "binutils" |
472 |
%post |
473 |
%_install_info as.info |
474 |
%_install_info bfd.info |
475 |
%_install_info binutils.info |
476 |
%_install_info gasp.info |
477 |
%_install_info gprof.info |
478 |
%_install_info ld.info |
479 |
%_install_info standards.info |
480 |
%endif |
481 |
|
482 |
%if "%{name}" == "binutils" |
483 |
%preun |
484 |
%_remove_install_info as.info |
485 |
%_remove_install_info bfd.info |
486 |
%_remove_install_info binutils.info |
487 |
%_remove_install_info gasp.info |
488 |
%_remove_install_info gprof.info |
489 |
%_remove_install_info ld.info |
490 |
%_remove_install_info standards.info |
491 |
%endif |
492 |
|
493 |
%files -f binutils.lang |
494 |
%{_bindir}/%{program_prefix}addr2line |
495 |
%{_bindir}/%{program_prefix}ar |
496 |
%{_bindir}/%{program_prefix}as |
497 |
%{_bindir}/%{program_prefix}c++filt |
498 |
%{_bindir}/%{program_prefix}dwp |
499 |
%{_bindir}/%{program_prefix}elfedit |
500 |
%{_bindir}/%{program_prefix}gprof |
501 |
%{_bindir}/%{program_prefix}ld |
502 |
%{_bindir}/%{program_prefix}ld.bfd |
503 |
%if %isarch %{gold_arches} |
504 |
%{_bindir}/%{program_prefix}ld.gold |
505 |
%endif |
506 |
%{_bindir}/%{program_prefix}nm |
507 |
%{_bindir}/%{program_prefix}objcopy |
508 |
%{_bindir}/%{program_prefix}objdump |
509 |
%{_bindir}/%{program_prefix}ranlib |
510 |
%{_bindir}/%{program_prefix}readelf |
511 |
%{_bindir}/%{program_prefix}size |
512 |
%{_bindir}/%{program_prefix}strings |
513 |
%{_bindir}/%{program_prefix}strip |
514 |
%ifarch %{spu_arches} |
515 |
%{_bindir}/ppu-as |
516 |
%endif |
517 |
%{_mandir}/man1/* |
518 |
%if "%{name}" == "binutils" |
519 |
%{_infodir}/*info* |
520 |
%{_libdir}/libbfd-%{version}*.so |
521 |
%{_libdir}/libopcodes-%{version}*.so |
522 |
%else |
523 |
%{_prefix}/%{target_platform}/bin/* |
524 |
%{_prefix}/%{target_platform}/lib/ldscripts |
525 |
%endif |
526 |
|
527 |
%ifarch %{spu_arches} |
528 |
%files -n spu-binutils |
529 |
%{_bindir}/spu-* |
530 |
%{_bindir}/embedspu |
531 |
%dir %{_prefix}/spu/bin |
532 |
%{_prefix}/spu/bin |
533 |
%endif |
534 |
|
535 |
%if "%{name}" == "binutils" |
536 |
%files -n %{dev_name} |
537 |
%{_includedir}/*.h |
538 |
%{_libdir}/libbfd.a |
539 |
%{_libdir}/libbfd.so |
540 |
%{_libdir}/libopcodes.a |
541 |
%{_libdir}/libopcodes.so |
542 |
%{_libdir}/libiberty.a |
543 |
%endif |