!292 delete binutils-gold package and ld.gold move to binutils package

From: @huyubiao 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
This commit is contained in:
openeuler-ci-bot 2024-09-04 09:54:30 +00:00 committed by Gitee
commit 07537e47f6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2,7 +2,7 @@
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: binutils%{?_with_debug:-debug} Name: binutils%{?_with_debug:-debug}
Version: 2.41 Version: 2.41
Release: 7 Release: 8
License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -252,6 +252,8 @@ BuildRequires: gcc
%if %{with gold} %if %{with gold}
# Gold needs bison in order to build gold/yyscript.c. The GOLD testsuite needs a static libc++ # Gold needs bison in order to build gold/yyscript.c. The GOLD testsuite needs a static libc++
BuildRequires: bison, m4, gcc-c++, libstdc++-static BuildRequires: bison, m4, gcc-c++, libstdc++-static
Provides: binutils-gold = %{version}-%{release}
Obsoletes: binutils-gold < %{version}-%{release}
%if ! %{with clang} %if ! %{with clang}
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -298,15 +300,6 @@ Requires(preun): %{_sbindir}/alternatives
# We also need rm. # We also need rm.
Requires(post): coreutils Requires(post): coreutils
%if %{with gold}
# For now we make the binutils package require the gold sub-package.
# That way other packages that have a requirement on "binutils" but
# actually want gold will not have to be changed. In the future, if
# we decide to deprecate gold, we can remove this requirement, and
# then update other packages as necessary.
Requires: binutils-gold >= %{version}
%endif
# On ARM EABI systems, we do want -gnueabi to be part of the # On ARM EABI systems, we do want -gnueabi to be part of the
# target triple. # target triple.
%ifnarch %{arm} %ifnarch %{arm}
@ -366,18 +359,6 @@ using libelf instead of BFD.
%if %{with gold} %if %{with gold}
%package gold
Summary: The GOLD linker, a faster alternative to the BFD linker
Provides: gold = %{version}-%{release}
Requires: binutils >= %{version}
%description gold
This package provides the GOLD linker, which can be used as an alternative to
the default binutils linker (ld.bfd). The GOLD is generally faster than the
BFD linker, and it supports features such as Identical Code Folding and
Incremental linking. Unfortunately it is not as well maintained as the BFD
linker, and it may become deprecated in the future.
# The higher of these two numbers determines the default linker. # The higher of these two numbers determines the default linker.
%{!?ld_gold_priority:%global ld_gold_priority 30} %{!?ld_gold_priority:%global ld_gold_priority 30}
@ -1082,20 +1063,17 @@ export QA_RPATHS=0x0003
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%if %{with gold}
%post gold
%{_sbindir}/alternatives --install %{_bindir}/ld ld \
%{_bindir}/ld.gold %{ld_gold_priority}
exit 0
%endif
%post %post
# Remove the /usr/bin/ld file so that the alternatives program # Remove the /usr/bin/ld file so that the alternatives program
# can replace it with a symbolic link. # can replace it with a symbolic link.
%__rm -f %{_bindir}/ld %__rm -f %{_bindir}/ld
%if %{with gold}
%{_sbindir}/alternatives --install %{_bindir}/ld ld \
%{_bindir}/ld.gold %{ld_gold_priority}
%endif
%{_sbindir}/alternatives --install %{_bindir}/ld ld \ %{_sbindir}/alternatives --install %{_bindir}/ld ld \
%{_bindir}/ld.bfd %{ld_bfd_priority} %{_bindir}/ld.bfd %{ld_bfd_priority}
@ -1111,18 +1089,13 @@ exit 0
# Note: $1 == 0 means that there is an uninstall in progress. # Note: $1 == 0 means that there is an uninstall in progress.
# $1 == 1 means that there is an upgrade in progress. # $1 == 1 means that there is an upgrade in progress.
%if %{with gold}
%preun gold
if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.gold
fi
exit 0
%endif
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.bfd %{_sbindir}/alternatives --remove ld %{_bindir}/ld.bfd
%if %{with gold}
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.gold
%endif
fi fi
# Restore the /usr/bin/ld file so that the automatic file # Restore the /usr/bin/ld file so that the automatic file
@ -1168,6 +1141,9 @@ exit 0
# %%verify(symlink) does not work for some reason, so using "owner" instead. # %%verify(symlink) does not work for some reason, so using "owner" instead.
%verify(owner) %{_bindir}/ld %verify(owner) %{_bindir}/ld
%{_bindir}/ld.bfd %{_bindir}/ld.bfd
%if %{with gold}
%{_bindir}/%{?cross}ld.gold
%endif
%if %{with gprofng} %if %{with gprofng}
%exclude %{_bindir}/gp-* %exclude %{_bindir}/gp-*
@ -1220,11 +1196,6 @@ exit 0
%exclude %{_libdir}/lib*.la %exclude %{_libdir}/lib*.la
%endif %endif
%if %{with gold}
%files gold
%{_bindir}/%{?cross}ld.gold
%endif
%if %{with gprofng} %if %{with gprofng}
%files gprofng %files gprofng
%{_bindir}/gp-* %{_bindir}/gp-*
@ -1267,6 +1238,9 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Mon Sep 2 2024 huyubiao <huyubiao@huawei.com> - 2.41-8
- delete binutils-gold package and ld.gold move to binutils package
* Mon Aug 5 2024 huyubiao <huyubiao@huawei.com> - 2.41-7 * Mon Aug 5 2024 huyubiao <huyubiao@huawei.com> - 2.41-7
- delete jansson - delete jansson