# CodeSourcery releases are identified by a date, a release number,
# and a package number for downloading from their web site
%global cs_date 2014.05
%global cs_rel 28
%global cs_pkgnum 12773
%global binutils_ver 2.25
%global processor_arch arm
%global target %{processor_arch}-none-eabi
Name: %{target}-binutils-cs
Epoch: 1
Version: 2.25
Release: 3%{?dist}
Summary: GNU Binutils for cross-compilation for %{target} target
Group: Development/Tools
# Most of the sources are licensed under GPLv3+ with these exceptions:
# LGPLv2+ bfd/hosts/x86-64linux.h, include/demangle.h, include/xregex2.h,
# GPLv2+ gprof/cg_print.h
# BSD gprof/cg_arcs.h, gprof/utils.c, ld/elf-hints-local.h,
# Public Domain libiberty/memmove.c
License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD
URL: http://www.codesourcery.com/sgpp/lite/%{processor_arch}
Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{version}.tar.bz2
Source1: README.fedora
Patch2: binutils-2.24-cve_2014_8501.patch
Patch3: binutils-2.24-cve_2014_8502pre.patch
Patch4: binutils-2.24-cve_2014_8502a.patch
Patch5: binutils-2.24-cve_2014_8503.patch
Patch6: binutils-2.24-cve_2014_8504.patch
Patch7: binutils-2.24-dirtravel.patch
Patch8: binutils-2.24-cve_2014_8738.patch
BuildRequires: flex bison ppl-devel cloog
BuildRequires: texinfo texinfo-tex perl-podlators
Provides: %{target}-binutils = %{binutils_ver}
%description
This is a cross-compilation version of GNU Binutils, which can be used to
assemble and link binaries for the %{target} platform.
This Binutils package is based on the CodeSourcery
%{cs_date}-%{cs_rel} release, which includes improved ARM target
support compared to the corresponding FSF release. CodeSourcery
contributes their changes to the FSF, but it takes a while for them to
get merged. For the ARM target, effectively CodeSourcery is upstream
of FSF.
%prep
%setup -q -n binutils-%{version}
cp -p %{SOURCE1} .
rm -rf gdb sim
%build
./configure CFLAGS="$RPM_OPT_FLAGS" \
--target=%{target} \
--enable-interwork \
--enable-multilib \
--enable-plugins \
--disable-nls \
--disable-shared \
--disable-threads \
--with-gcc --with-gnu-as --with-gnu-ld \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--with-docdir=share/doc/%{name} \
--disable-werror \
--with-pkgversion="Fedora %{version}-%{release}" \
--with-bugurl="https://bugzilla.redhat.com/"
make %{?_smp_mflags}
%check
make check
%install
make install DESTDIR=%{buildroot}
# these are for win targets only
rm %{buildroot}%{_mandir}/man1/%{target}-{dlltool,nlmconv,windres}.1
# we don't want these as we are a cross version
rm -r %{buildroot}%{_infodir}
%files
%defattr(-,root,root,-)
%doc COPYING* ChangeLog README.fedora
%{_prefix}/%{target}
%{_bindir}/%{target}-*
%{_mandir}/man1/%{target}-*.1.gz
%changelog
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.25-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.25-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun May 31 2015 Michal Hlavinka <mhlavink@redhat.com> - 1:2.25-1
- updated to vanila 2.25
* Thu Nov 13 2014 Michal Hlavinka <mhlavink@redhat.com> - 2014.05.28-3
- fix CVE-2014-8738: out of bounds memory write
* Wed Nov 12 2014 Michal Hlavinka <mhlavink@redhat.com> - 2014.05.28-2
- fix directory traversal vulnerability (#1162657)
- fix CVE-2014-8501: out-of-bounds write when parsing specially crafted PE executable
- fix CVE-2014-8502: heap overflow in objdump
- fix CVE-2014-8503: stack overflow in objdump when parsing specially crafted ihex file
- fix CVE-2014-8504: stack overflow in the SREC parser
* Wed Aug 20 2014 Michal Hlavinka <mhlavink@redhat.com> - 2014.05.28-1
- updated to 2014.05-28
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.11.24-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.11.24-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Jan 13 2014 Michal Hlavinka <mhlavink@redhat.com> - 2013.11.24-1
- updated to 2013.11-24
* Wed Aug 21 2013 Michal Hlavinka <mhlavink@redhat.com> - 2013.05.23-1
- updated to 2013.05-23
* Thu Aug 08 2013 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-5
- use unversioned docdir (#993677)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012.09.63-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 20 2013 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-3
- add provides, so we can combine CodeSourcery and upstream versions
* Wed Feb 20 2013 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-2
- make it build with new texinfo
* Mon Dec 03 2012 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-1
- new spec for arm-none-eabi using CodeSourcery release