Preserve debug information in libbfd.a and libopcodes.a.

Resolves: #1924068
This commit is contained in:
Nick Clifton 2021-02-04 20:29:52 +00:00
parent 5cef9601f1
commit c014d04d53

View File

@ -39,7 +39,7 @@
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: binutils%{?name_cross}%{?_with_debug:-debug} Name: binutils%{?name_cross}%{?_with_debug:-debug}
Version: 2.35.1 Version: 2.35.1
Release: 32%{?dist} Release: 33%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -138,6 +138,11 @@ URL: https://sourceware.org/binutils
# .so that is used at run time). # .so that is used at run time).
%undefine _strict_symbol_defs_build %undefine _strict_symbol_defs_build
# BZ 1924068. Since applications that use the BFD library are
# required to link against the static version, ensure that it retains
# its debug informnation.
%undefine __brp_strip_static_archive
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Note - the Linux Kernel binutils releases are too unstable and contain # Note - the Linux Kernel binutils releases are too unstable and contain
@ -436,6 +441,14 @@ dynamic libraries.
Developers starting new projects are strongly encouraged to consider Developers starting new projects are strongly encouraged to consider
using libelf instead of BFD. using libelf instead of BFD.
# BZ 1924068. Since applications that use the BFD library are
# required to link against the static version, ensure that it retains
# its debug informnation.
# FIXME: Yes - this is being done twice. I have no idea why this
# second invocation is necessary but if both are not present the
# static archives will be stripped.
%undefine __brp_strip_static_archive
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%if %{with gold} %if %{with gold}
@ -822,6 +835,7 @@ fi
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%post %post
%__rm -f %{_bindir}/%{?cross}ld %__rm -f %{_bindir}/%{?cross}ld
%{_sbindir}/alternatives --install %{_bindir}/%{?cross}ld %{?cross}ld \ %{_sbindir}/alternatives --install %{_bindir}/%{?cross}ld %{?cross}ld \
%{_bindir}/%{?cross}ld.bfd %{ld_bfd_priority} %{_bindir}/%{?cross}ld.bfd %{ld_bfd_priority}
@ -908,6 +922,9 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Thu Feb 04 2021 Nick Clifton <nickc@redhat.com> - 2.35.1-33
- Preserve debug information in libbfd.a and libopcodes.a. (#1924068)
* Thu Feb 04 2021 Nick Clifton <nickc@redhat.com> - 2.35.1-32 * Thu Feb 04 2021 Nick Clifton <nickc@redhat.com> - 2.35.1-32
- Extend vulnerability fix again. (#1913744) - Extend vulnerability fix again. (#1913744)