-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrockbox-arm-elf-eabi-binutils.spec
75 lines (58 loc) · 1.95 KB
/
rockbox-arm-elf-eabi-binutils.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
%define target arm-elf-eabi
%define __spec_install_post\
/usr/lib/rpm/brp-compress\
/usr/lib/rpm/brp-strip
%define _binary_payload w7.xzdio
Name: rockbox-%{target}-binutils
Version: 2.20.1
Release: 1%{?dist}
Summary: Rockbox Cross Compiling GNU binutils targeted at %{target}
Group: Development/Tools
License: GPLv2+
URL: http://www.gnu.org/software/binutils/
Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{version}.tar.bz2
Source1: README.fedora
Patch0: binutils-2.20.1-ld-thumb-interwork-long-call.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildRequires: gawk texinfo
%description
This is a Cross Compiling version of GNU binutils, which can be used to
assemble and link binaries for the %{target} platform, instead of for the
native %{_arch} platform.
This package has been build for Rockbox development (http://www.rockbox.org).
%prep
%setup -q -c
%patch0
cp %{SOURCE1} .
%build
mkdir -p build
pushd build
CFLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE" ../binutils-%{version}/configure \
--prefix=%{_prefix} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir} \
--target=%{target} \
--disable-werror --disable-nls --disable-docs
make %{?_smp_mflags}
popd build
%install
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
popd build
# these are for win targets only
rm $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{dlltool,nlmconv,windres}.1
# we don't want these as we are a cross version
rm -r $RPM_BUILD_ROOT%{_infodir}
rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc binutils-%{version}/COPYING binutils-%{version}/COPYING.LIB
%doc binutils-%{version}/README README.fedora
%{_prefix}/%{target}
%{_bindir}/%{target}-*
%{_mandir}/man1/%{target}-*.1.gz
%changelog
* Sun Mar 11 2012 Dominik Riebeling <[email protected]> - 2.20.1-1
- initial version