Update annobin plugin patch

Resolves: #2030667
This commit is contained in:
Marek Polacek 2022-01-24 17:16:09 -05:00
parent df40126a22
commit cac8cbdc56

View File

@ -115,19 +115,11 @@
%ifarch x86_64
%global multilib_32_arch i686
%endif
# The next line has been stolen from redhat-rpm-config.spec.
# We install the version info into a file in this directory, rather than
# gcc's plugin directory, because there is no reliable way for redhat-rpm-config
# to determine the name of gcc's plugin directory.
# FIXME: We need a way to cope if more than one version of gcc is installed.
%global rrcdir /usr/lib/rpm/redhat
# A file that records information about the built gcc-annobin plugin.
%global gver %{rrcdir}/gcc-annobin-plugin-version-info
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
Release: %{gcc_release}.5%{?dist}
Release: %{gcc_release}.6%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -2118,29 +2110,6 @@ cp ${annobin_dir}/gcc-plugin/.libs/annobin.so.0.0.0 gcc-annobin.so.0.0.0
rm -f gcc-annobin.so.0 gcc-annobin.so
ln -s gcc-annobin.so.0.0.0 gcc-annobin.so.0
ln -s gcc-annobin.so.0.0.0 gcc-annobin.so
# Record information about the version of the compiler that built the plugin.
#
# Note - we cannot just store %%{gcc_version} and %%{gcc_release} as sometimes
# the gcc rpm version changes without the NVR being altered. See BZ #2030671
# for more discussion on this.
#
# Note that when performing a scratch build %%{release} will not contain
# a distribution tag. Ie it would be "1-7" rather than "1-7.fc36". This means
# that if a scratch build is installed, eg into a mock chroot, then the logic
# in redhat-rpm-config's redhat-annobin-plugin-select.sh script will always
# select the gcc built plugin no matter what. (Since the version string for
# the gcc built plugin can never match the version string for the annobin
# built plugin, as the annobin version string always includes a distribution
# tag). Sadly this is unavoidable.
mkdir -p %{buildroot}%{rrcdir}
echo "%{version}-%{release}" > %{buildroot}%{gver}
# Provide a more complete version information string on the second line.
# This is not used by the comparison logic in the redhat-annobin-plugin-select.sh
# script, but it does make the file more useful to humans.
echo "%{ANNOBIN_GCC_PLUGIN_DIR}/gcc-annobin.so.0.0.0 was built by gcc version %{gcc_version}-%{gcc_release} from the ${annobin_dir} sources" >> %{buildroot}%{gver}
popd
%check
@ -3290,9 +3259,11 @@ end
%{ANNOBIN_GCC_PLUGIN_DIR}/gcc-annobin.so
%{ANNOBIN_GCC_PLUGIN_DIR}/gcc-annobin.so.0
%{ANNOBIN_GCC_PLUGIN_DIR}/gcc-annobin.so.0.0.0
%{gver}
%changelog
* Mon Jan 24 2022 Marek Polacek <polacek@redhat.com> 11.2.1-7.6
- update annobin plugin patch (#2030667)
* Thu Jan 13 2022 Marek Polacek <polacek@redhat.com> 11.2.1-7.5
- update annobin plugin patch (#2030667)