Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/binutils.git#0781ec435c48a3c7f694d66b58d9bfb859e156b9
This commit is contained in:
DistroBaker 2020-11-25 23:17:33 +00:00
parent 7530642c52
commit 0e5509ece9
3 changed files with 13162 additions and 21 deletions

13035
binutils-2.35.1-update.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,45 @@
# Determine if this is a native build or a cross build.
#
# For a cross build add --define "binutils_target <target>" to the command
# line when building the rpms.
#
# For example:
# --define "binutils_target aarch64-linux-gnu"
#
# Cross builds will create a set of binutils executables that will run on the
# host machine but which will create binaries suitable for running on the
# target machine. The cross tools will have the target name as a prefix,
# but for compatibility with the kernel the rpms will use the target name
# as an infix. So for example building with the above define will create a
# set of rpms like this:
#
# binutils-aarch64-linux-gnu-2.35.1-14.fc34.x86_64.rpm
# binutils-aarch64-linux-gnu-debuginfo-2.35.1-14.fc34.x86_64.rpm
# [etc]
#
# and the rpms will contain files like:
#
# /usr/bin/aarch64-linux-gnu-addr2line
# /usr/bin/aarch64-linux-gnu-ar
# /usr/bin/aarch64-linux-gnu-as
# [etc]
%if 0%{!?binutils_target:1}
%define binutils_target %{_target_platform}
%define isnative 1
%define enable_shared 1
%else
%define cross %{binutils_target}-
%define name_cross -%{binutils_target}
%define isnative 0
%define enable_shared 0
%endif
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Name: binutils%{?name_cross}%{?_with_debug:-debug}
Version: 2.35.1
Release: 14%{?dist}
Release: 15%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
@ -11,12 +48,11 @@ URL: https://sourceware.org/binutils
# Binutils SPEC file. Can be invoked with the following parameters to change
# the default behaviour:
# --define "binutils_target arm-linux-gnu" to create arm-linux-gnu-binutils.
#
# --with bootstrap Build with minimal dependencies.
# --with debug Build without optimizations and without splitting
# the debuginfo into a separate file.
# --without docs Skip building documentation.
# Default is with docs, except when building a cross binutils.
# --without testsuite Do not run the testsuite. Default is to run it.
# --without gold Disable building of the GOLD linker.
# --with clang To force building with the CLANG.
@ -90,16 +126,6 @@ URL: https://sourceware.org/binutils
%undefine with_testsuite
%endif
%if 0%{!?binutils_target:1}
%define binutils_target %{_target_platform}
%define isnative 1
%define enable_shared 1
%else
%define cross %{binutils_target}-
%define isnative 0
%define enable_shared 0
%endif
# The opcodes library needs a few functions defined in the bfd
# library, but these symbols are not defined in the stub bfd .so
# that is available at link time. (They are present in the real
@ -117,6 +143,9 @@ Source2: binutils-2.19.50.0.1-output-format.sed
#----------------------------------------------------------------------------
Patch00: binutils-2.35.1-update.patch
# Purpose: Use /lib64 and /usr/lib64 instead of /lib and /usr/lib in the
# default library search path of 64-bit targets.
# Lifetime: Permanent, but it should not be. This is a bug in the libtool
@ -247,7 +276,7 @@ Patch24: binutils-strip-merge.patch
# Purpose: Fix various problems with the PowerPC arch10 extensions.
# Lifetime: Fixed in 2.36
Patch25: binutils-Power10-fixes.patch
# Patch25: binutils-Power10-fixes.patch
# Purpose: Allow plugin syms to mark as-needed shared libs needed.
# Lifetime: Fixed in 2.36
@ -260,9 +289,9 @@ Patch27: binutils-recursive-debuglink-following.patch
# Purpose: Fix the DWARF parser to skip DW_FORM_ref_addr types
# when attempting to determine a type's signedness.
# Lifetime: Fixed in 2.36
Patch28: binutils-dwarf-type-sign.patch
Patch29: binutils-dwarf-type-sign-2.patch
Patch30: binutils-dwarf-DW_FORM_ref8.patch
# Patch28: binutils-dwarf-type-sign.patch
# Patch29: binutils-dwarf-type-sign-2.patch
# Patch30: binutils-dwarf-DW_FORM_ref8.patch
#----------------------------------------------------------------------------
@ -530,8 +559,8 @@ autoconf
popd
# We could optimize the cross builds size by --enable-shared but the produced
# binaries may be less convenient in the embedded environment.
# We could improve the cross build's size by setting --enable-shared but
# the produced binaries may be less convenient in the embedded environment.
%configure \
--quiet \
--build=%{_target_platform} --host=%{_target_platform} \
@ -806,13 +835,15 @@ exit 0
%{_bindir}/%{?cross}ld.bfd
%if %{with docs}
%{_mandir}/man1/*
%{_mandir}/man1/
%if %{isnative}
%{_infodir}/as.info.*
%{_infodir}/binutils.info.*
%{_infodir}/gprof.info.*
%{_infodir}/ld.info.*
%{_infodir}/bfd.info.*
%endif
%endif
%if %{enable_shared}
%{_libdir}/lib*.so
@ -840,6 +871,9 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Wed Nov 25 2020 Nick Clifton <nickc@redhat.com> - 2.35.1-15
- Import fixes added to the 2.35 branch after the 2.35.1 release.
* Tue Nov 10 2020 Nick Clifton <nickc@redhat.com> - 2.35.1-14
- Add support for DW_FORM_ref8 when parsing DWARF types. (#1893921)

72
spec.binutils.cross Normal file
View File

@ -0,0 +1,72 @@
# Note - this is an rpm spec file, but it has been renamed in order to avoid
# conflict with the real binutils.spec file.
#
# Its only use is to build a set of cross-binutils rpms by installing it
# into an rpmbuild tree where the binutils source rpm has already been placed.
# It should be run as:
#
# rpmbuild -bb spec.binutils.cross
Summary: A meta collection of GNU binutils executables for cross builds
Name: cross-binutils
# Note: KEEP THE Version and Release fields IN SYNC with binutils.spec
Version: 2.35.1
Release: 14%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
Source: binutils.spec
# Provides: bundled(libiberty)
BuildRequires: autoconf automake
BuildRequires: perl, sed, coreutils
BuildRequires: gcc
BuildRequires: gettext, flex, zlib-devel
BuildRequires: findutils
BuildRequires: dejagnu, zlib-static, glibc-static, sharutils, bc
BuildRequires: elfutils-debuginfod-client-devel
BuildRequires: rpm-build
Requires(post): %{_sbindir}/alternatives
Requires(post): coreutils
Requires(preun): %{_sbindir}/alternatives
#----------------------------------------------------------------------------
%description
Provides a collection of cross built binutils for the targets
supported by RHEL (aarch64, i686, ppc64le, s390x).
# Note - this list assumes that we are building on an x86_64-linux-gnu host.
%define arch_list aarch64-linux-gnu i686-linux-gnu ppc64le-linux-gnu s390x-linux-gnu
#----------------------------------------------------------------------------
%prep
#----------------------------------------------------------------------------
%build
# Build each set of cross binutils individually.
for f in %{arch_list}; do
rpmbuild -bb --define "binutils_target $f" %{_specdir}/binutils.spec --without testsuite
done
#----------------------------------------------------------------------------
%install
#----------------------------------------------------------------------------
%files
#----------------------------------------------------------------------------
%changelog
* Wed Nov 11 2020 Nick Clifton <nickc@redhat.com> - 2.35.1-14
- First release of cross binutils rpm.