parent
c6f5913fbc
commit
2e9ffefb81
50
gcc.spec
50
gcc.spec
@ -127,8 +127,8 @@
|
|||||||
# The next line has been stolen from redhat-rpm-config.spec.
|
# The next line has been stolen from redhat-rpm-config.spec.
|
||||||
# We install the version info into a file in this directory, rather than
|
# 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
|
# gcc's plugin directory, because there is no reliable way for redhat-rpm-config
|
||||||
# to determine the name of gcc's plugin directory. Plus there may be more than
|
# to determine the name of gcc's plugin directory.
|
||||||
# one plugin directory if different versions of gcc are installed.
|
# FIXME: We need a way to cope if more than one version of gcc is installed.
|
||||||
%global rrcdir /usr/lib/rpm/redhat
|
%global rrcdir /usr/lib/rpm/redhat
|
||||||
|
|
||||||
# A file that records information about the built gcc-annobin plugin.
|
# A file that records information about the built gcc-annobin plugin.
|
||||||
@ -137,7 +137,7 @@
|
|||||||
Summary: Various compilers (C, C++, Objective-C, ...)
|
Summary: Various compilers (C, C++, Objective-C, ...)
|
||||||
Name: gcc
|
Name: gcc
|
||||||
Version: %{gcc_version}
|
Version: %{gcc_version}
|
||||||
Release: %{gcc_release}.1%{?dist}
|
Release: %{gcc_release}.2%{?dist}
|
||||||
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
|
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
|
||||||
# GCC Runtime Exception.
|
# GCC Runtime Exception.
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
||||||
@ -226,9 +226,10 @@ BuildRequires: graphviz, dblatex, texlive-collection-latex, docbook5-style-xsl
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with annobin_plugin}
|
%if %{with annobin_plugin}
|
||||||
# Starting with release 9.93 annobin puts a copy of the sources in /usr/src/annobin
|
|
||||||
# Starting with release 10.01 annobin fixed a bug in its configure scripts which prevented them from working with a built but not installed compiler
|
# Starting with release 10.01 annobin fixed a bug in its configure scripts which prevented them from working with a built but not installed compiler
|
||||||
BuildRequires: annobin >= 10.01
|
BuildRequires: annobin >= 10.01
|
||||||
|
# Starting with release 9.93 annobin-plugin-gcc puts a copy of the sources in /usr/src/annobin
|
||||||
|
BuildRequires: annobin-plugin-gcc
|
||||||
# See The %%install phase for why we need xz.
|
# See The %%install phase for why we need xz.
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
%endif
|
%endif
|
||||||
@ -1302,7 +1303,7 @@ CC="${ccompiler}" CFLAGS="${comp_flags}" \
|
|||||||
./configure ${CONFIG_ARGS} || cat config.log
|
./configure ${CONFIG_ARGS} || cat config.log
|
||||||
|
|
||||||
echo "Building the annobin plugin"
|
echo "Building the annobin plugin"
|
||||||
make
|
make
|
||||||
|
|
||||||
echo "Annobin plugin build complete"
|
echo "Annobin plugin build complete"
|
||||||
popd
|
popd
|
||||||
@ -2126,14 +2127,27 @@ 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.0
|
||||||
ln -s gcc-annobin.so.0.0.0 gcc-annobin.so
|
ln -s gcc-annobin.so.0.0.0 gcc-annobin.so
|
||||||
|
|
||||||
# Record information about the plugin.
|
# Record information about the version of the compiler that built the plugin.
|
||||||
mkdir -p %{buildroot}%{rrcdir}
|
#
|
||||||
# Note - the comparison logic in redhat-rpm-config's %%triggger macros require
|
# Note - we cannot just store %%{gcc_version} and %%{gcc_release} as sometimes
|
||||||
# that the plugin builder information appear as "major.minor.revision-release",
|
# the gcc rpm version changes without the NVR being altered. See BZ #2030671
|
||||||
# eg "11.2.1-1" on the first line of the version file.
|
# for more discussion on this.
|
||||||
echo "%{gcc_version}-%{gcc_release}" > %{buildroot}%{gver}
|
#
|
||||||
|
# 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.
|
# Provide a more complete version information string on the second line.
|
||||||
# This is not used by the comparison logic, but makes the file more useful to humans.
|
# 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}
|
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
|
popd
|
||||||
# endif for %{with annobin_plugin}
|
# endif for %{with annobin_plugin}
|
||||||
@ -2150,6 +2164,15 @@ ln -s gcc-annobin.so.0.0.0 gcc-annobin.so
|
|||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with annobin_plugin}
|
||||||
|
%preun
|
||||||
|
pushd %{ANNOBIN_GCC_PLUGIN_DIR} > /dev/null
|
||||||
|
# Compress the annobin plugin before it is removed. This avoids a warning from rpm.
|
||||||
|
rm -f gcc-annobin.so.0 gcc-annobin.so
|
||||||
|
xz -9 gcc-annobin.so.0.0.0
|
||||||
|
popd > /dev/null
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
cd obj-%{gcc_target_platform}
|
cd obj-%{gcc_target_platform}
|
||||||
@ -3303,6 +3326,9 @@ end
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 4 2022 Marek Polacek <polacek@redhat.com> 11.2.1-7.2
|
||||||
|
- update annobin plugin patch (#2030667)
|
||||||
|
|
||||||
* Thu Dec 16 2021 Marek Polacek <polacek@redhat.com> 11.2.1-7.1
|
* Thu Dec 16 2021 Marek Polacek <polacek@redhat.com> 11.2.1-7.1
|
||||||
- build annobin plugin (patch by Nick Clifton) (#2030667)
|
- build annobin plugin (patch by Nick Clifton) (#2030667)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user