ce0ff48
%global processor_arch arm
ce0ff48
%global target         %{processor_arch}-none-eabi
ce0ff48
ce0ff48
Name:           %{target}-binutils-cs
e7b9081
Epoch:          1
7861725
Version:        2.38
7861725
Release:        1%{?dist}
ce0ff48
Summary:        GNU Binutils for cross-compilation for %{target} target
ce0ff48
# Most of the sources are licensed under GPLv3+ with these exceptions:
ce0ff48
# LGPLv2+ bfd/hosts/x86-64linux.h, include/demangle.h, include/xregex2.h,
ce0ff48
# GPLv2+  gprof/cg_print.h
ce0ff48
# BSD     gprof/cg_arcs.h, gprof/utils.c, ld/elf-hints-local.h,
ce0ff48
# Public Domain libiberty/memmove.c
ce0ff48
License:        GPLv2+ and GPLv3+ and LGPLv2+ and BSD
ce0ff48
URL:            http://www.codesourcery.com/sgpp/lite/%{processor_arch}
ce0ff48
cf97982
Source0:        https://ftp.gnu.org/pub/gnu/binutils/binutils-%{version}.tar.xz
ce0ff48
ce0ff48
Source1:        README.fedora
336367c
Patch7: binutils-2.24-dirtravel.patch
89edae2
Patch8: binutils-config.patch
3b5b86b
BuildRequires:  gcc flex bison ppl-devel cloog
dcf40fa
BuildRequires:  autoconf
806e29c
BuildRequires:  texinfo texinfo-tex perl-podlators
926df4b
BuildRequires:  make zlib-devel
97c9c15
Provides:       %{target}-binutils = %{version}
ce0ff48
ce0ff48
%description
ce0ff48
This is a cross-compilation version of GNU Binutils, which can be used to
ce0ff48
assemble and link binaries for the %{target} platform.  
ce0ff48
Michal Hlavink 314f251
Binutils is a collection of binary utilities, including ar (for
Michal Hlavink 314f251
creating, modifying and extracting from archives), as (a family of GNU
Michal Hlavink 314f251
assemblers), gprof (for displaying call graph profile data), ld (the
Michal Hlavink 314f251
GNU linker), nm (for listing symbols from object files), objcopy (for
Michal Hlavink 314f251
copying and translating object files), objdump (for displaying
Michal Hlavink 314f251
information from object files), ranlib (for generating an index for
Michal Hlavink 314f251
the contents of an archive), readelf (for displaying detailed
Michal Hlavink 314f251
information about binary files), size (for listing the section sizes
Michal Hlavink 314f251
of an object or archive file), strings (for listing printable strings
Michal Hlavink 314f251
from files), strip (for discarding symbols), and addr2line (for
Michal Hlavink 314f251
converting addresses to file and line).
ce0ff48
ce0ff48
%prep
e7b9081
%setup -q -n binutils-%{version}
19e63c7
%patch8 -p1 -b .bucfg
ce0ff48
cp -p %{SOURCE1} .
d06bdb1
rm -rf gdb sim
ce0ff48
ce0ff48
%build
89edae2
# We call configure directly rather than via macros, thus if
89edae2
# we are using LTO, we have to manually fix the broken configure
89edae2
# scripts
89edae2
pushd libiberty
dcf40fa
#autoconf -f
89edae2
popd
89edae2
pushd intl
dcf40fa
#autoconf -f
89edae2
popd
89edae2
[ %{_lto_cflags}x != x ] && %{_fix_broken_configure_for_lto}
89edae2
ce0ff48
./configure CFLAGS="$RPM_OPT_FLAGS" \
ce0ff48
            --target=%{target} \
ce0ff48
            --enable-interwork \
ce0ff48
            --enable-multilib \
d06bdb1
            --enable-plugins \
ce0ff48
            --disable-nls \
ce0ff48
            --disable-shared \
ce0ff48
            --disable-threads \
ce0ff48
            --with-gcc --with-gnu-as --with-gnu-ld \
19e63c7
            --with-system-zlib \
ce0ff48
            --prefix=%{_prefix} \
ce0ff48
            --libdir=%{_libdir} \
ce0ff48
            --mandir=%{_mandir} \
ce0ff48
            --infodir=%{_infodir} \
f96d7bb
            --with-docdir=share/doc/%{name} \
ce0ff48
            --disable-werror \
ce0ff48
            --with-pkgversion="Fedora %{version}-%{release}" \
ce0ff48
            --with-bugurl="https://bugzilla.redhat.com/"
ce0ff48
make %{?_smp_mflags}
ce0ff48
ce0ff48
%check
cd4ca98
%ifnarch s390x
cd4ca98
make check
cd4ca98
%endif
cd4ca98
echo "completed"
ce0ff48
ce0ff48
%install
cc7732a
make install DESTDIR=$RPM_BUILD_ROOT
ce0ff48
# these are for win targets only
cc7732a
rm    $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{dlltool,windres}.1
ce0ff48
# we don't want these as we are a cross version
cc7732a
rm -r $RPM_BUILD_ROOT%{_infodir}
cc7732a
rm    $RPM_BUILD_ROOT%{_libdir}/lib*.a $RPM_BUILD_ROOT%{_libdir}/bfd-plugins/libdep* ||:
ce0ff48
ce0ff48
ce0ff48
%files
9a86325
%license COPYING*
9a86325
%doc ChangeLog README.fedora
ce0ff48
%{_prefix}/%{target}
ce0ff48
%{_bindir}/%{target}-*
ce0ff48
%{_mandir}/man1/%{target}-*.1.gz
ce0ff48
ce0ff48
ce0ff48
%changelog
7861725
* Mon May 09 2022 Michal Hlavinka <mhlavink@redhat.com> - 1:2.38-1
7861725
- updated to 2.38
7861725
bc222d7
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.37-4
bc222d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
bc222d7
dcf40fa
* Mon Sep 06 2021 Michal Hlavinka <mhlavink@redhat.com> - 1:2.37-3
dcf40fa
- temp. disable autoconf as 2.71 is not compatible
dcf40fa
663e67f
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.37-2
663e67f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
663e67f
19e63c7
* Tue Jul 20 2021 Michal Hlavinka <mhlavink@redhat.com> - 1:2.37-1
19e63c7
- updated to 2.37
19e63c7
a7e4b15
* Tue May 04 2021 Michal Hlavinka <mhlavink@redhat.com> - 1:2.36.1-1
a7e4b15
- updated to 2.36.1
a7e4b15
e47511e
* Tue May 04 2021 Michal Hlavinka <mhlavink@redhat.com> - 1:2.36-1
e47511e
- updated to 2.36
e47511e
cef2f49
* Mon May 03 2021 Michal Hlavinka <mhlavink@redhat.com> - 1:2.35-4
cef2f49
- bump release for rebuild
cef2f49
3b5b86b
* Mon Apr 12 2021 Michal Hlavinka <mhlavink@redhat.com> - 1:2.35-3
3b5b86b
- add explicit requirement for autoconf 2.69
3b5b86b
2bcaee8
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.35-2
2bcaee8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2bcaee8
ea29cd8
* Wed Nov 04 2020 Michal Hlavinka <mhlavink@redhat.com> - 1:2.35-1
ea29cd8
- updated to 2.35
ea29cd8
3c9253f
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.32-5
3c9253f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3c9253f
89edae2
* Tue Jul 21 2020 Jeff Law <law@redhat.com> - 1:2.32-4
89edae2
- Fix broken configure files compromised by LTO
89edae2
d257c7b
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.32-3
d257c7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d257c7b
821373c
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.32-2
821373c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
821373c
c9fc155
* Mon Feb 04 2019 Michal Hlavinka <mhlavink@redhat.com> - 1:2.32-1
c9fc155
- updated to 2.32
c9fc155
c32dced
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.30-4
c32dced
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c32dced
e3ca230
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.30-3
e3ca230
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e3ca230
0c65c03
* Wed Mar 07 2018 Michal Hlavinka <mhlavink@redhat.com> - 1:2.30-2
0c65c03
- add gcc buildrequire
0c65c03
e8553f1
* Tue Feb 06 2018 Michal Hlavinka <mhlavink@redhat.com> - 1:2.30-1
e8553f1
- updated to 2.30
e8553f1
f82ee06
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.28-3
f82ee06
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f82ee06
f198508
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.28-2
f198508
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f198508
03957bd
* Thu Mar 02 2017 Michal Hlavinka <mhlavink@redhat.com> - 1:2.28-1
03957bd
- updated to 2.28
03957bd
4e370cd
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.27-2
4e370cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4e370cd
220813d
* Sun Nov 13 2016 Michal Hlavinka <mhlavink@redhat.com> - 1:2.27-1
220813d
- updated to 2.27
220813d
Michal Hlavink 314f251
* Tue Jun 28 2016 Michal Hlavinka <mhlavink@redhat.com> - 1:2.26-1
Michal Hlavink 314f251
- update binutils to 2.26
Michal Hlavink 314f251
6e79326
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.25-3
6e79326
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6e79326
47e8749
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.25-2
47e8749
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
47e8749
e7b9081
* Sun May 31 2015 Michal Hlavinka <mhlavink@redhat.com> - 1:2.25-1
e7b9081
- updated to vanila 2.25
e7b9081
7e1484d
* Thu Nov 13 2014 Michal Hlavinka <mhlavink@redhat.com> - 2014.05.28-3
7e1484d
- fix CVE-2014-8738: out of bounds memory write
7e1484d
336367c
* Wed Nov 12 2014 Michal Hlavinka <mhlavink@redhat.com> - 2014.05.28-2
336367c
- fix directory traversal vulnerability (#1162657)
336367c
- fix CVE-2014-8501: out-of-bounds write when parsing specially crafted PE executable
336367c
- fix CVE-2014-8502: heap overflow in objdump
336367c
- fix CVE-2014-8503: stack overflow in objdump when parsing specially crafted ihex file
336367c
- fix CVE-2014-8504: stack overflow in the SREC parser
336367c
d06bdb1
* Wed Aug 20 2014 Michal Hlavinka <mhlavink@redhat.com> - 2014.05.28-1
d06bdb1
- updated to 2014.05-28
d06bdb1
0ef809c
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.11.24-3
0ef809c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
0ef809c
d345f98
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.11.24-2
d345f98
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d345f98
7aa3fa8
* Mon Jan 13 2014 Michal Hlavinka <mhlavink@redhat.com> - 2013.11.24-1
7aa3fa8
- updated to 2013.11-24
7aa3fa8
ca5aa44
* Wed Aug 21 2013 Michal Hlavinka <mhlavink@redhat.com> - 2013.05.23-1
ca5aa44
- updated to 2013.05-23
ca5aa44
f96d7bb
* Thu Aug 08 2013 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-5
f96d7bb
- use unversioned docdir (#993677)
f96d7bb
4b843c9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2012.09.63-4
4b843c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4b843c9
70009ae
* Wed Feb 20 2013 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-3
70009ae
- add provides, so we can combine CodeSourcery and upstream versions
70009ae
806e29c
* Wed Feb 20 2013 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-2
806e29c
- make it build with new texinfo
806e29c
ce0ff48
* Mon Dec 03 2012 Michal Hlavinka <mhlavink@redhat.com> - 2012.09.63-1
ce0ff48
- new spec for arm-none-eabi using CodeSourcery release