import annobin-8.78-1.el8

This commit is contained in:
CentOS Sources 2019-11-05 14:36:08 -05:00 committed by Andrew Lukoshko
parent c3879025ed
commit c9d58e9b65
3 changed files with 153 additions and 63 deletions

View File

@ -1 +1 @@
614adb91b1cfdafd70be85afc8d77bc10e39c959 SOURCES/annobin-8.64.tar.xz a1168f411d26bb7f0a7c950ee98d0a1fd2fb856d SOURCES/annobin-8.78.tar.xz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/annobin-8.64.tar.xz SOURCES/annobin-8.78.tar.xz

View File

@ -1,8 +1,14 @@
# Suppress this for BZ 1630550. Name: annobin
# The problem should now only arise when rebasing to a new major version Summary: Binary annotation plugin for GCC
# of gcc, in which case the undefine below can be temporarily reinstated. Version: 8.78
# Release: 1%{?dist}
License: GPLv3+
URL: https://fedoraproject.org/wiki/Toolchain/Watermark
# Maintainer: nickc@redhat.com
# # Do not build the annobin plugin with annotation enabled. # # Do not build the annobin plugin with annotation enabled.
# # This is because if we are bootstrapping a new build environment we can have # # This is because if we are bootstrapping a new build environment we can have
# # a new version of gcc installed, but without a new of annobin installed. # # a new version of gcc installed, but without a new of annobin installed.
@ -11,16 +17,13 @@
# # version, the old plugin will complain that version of gcc for which it # # version, the old plugin will complain that version of gcc for which it
# # was built is different from the version of gcc that is now being used, and # # was built is different from the version of gcc that is now being used, and
# # then it will abort. # # then it will abort.
#
# Suppress this for BZ 1630550.
# The problem should now only arise when rebasing to a new major version
# of gcc, in which case the undefine below can be temporarily reinstated.
#
# %%undefine _annotated_build # %%undefine _annotated_build
Name: annobin
Summary: Binary annotation plugin for GCC
Version: 8.64
Release: 1%{?dist}
License: GPLv3+
URL: https://fedoraproject.org/wiki/Toolchain/Watermark
# Use "--without tests" to disable the testsuite. The default is to run them. # Use "--without tests" to disable the testsuite. The default is to run them.
%bcond_without tests %bcond_without tests
@ -29,11 +32,12 @@ URL: https://fedoraproject.org/wiki/Toolchain/Watermark
# Set this to zero to disable the requirement for a specific version of gcc. # Set this to zero to disable the requirement for a specific version of gcc.
# This should only be needed if there is some kind of problem with the version # This should only be needed if there is some kind of problem with the version
# checking logic. # checking logic or when building on RHEL-7 or earlier.
%global with_hard_gcc_version_requirement 1 %global with_hard_gcc_version_requirement 1
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
Source: https://nickc.fedorapeople.org/annobin-%{version}.tar.xz # Source: https://nickc.fedorapeople.org/annobin-%%{version}.tar.xz
Source: annobin-%{version}.tar.xz
# For the latest sources use: git clone git://sourceware.org/git/annobin.git # For the latest sources use: git clone git://sourceware.org/git/annobin.git
# Insert patches here, if needed. # Insert patches here, if needed.
@ -41,12 +45,63 @@ Source: https://nickc.fedorapeople.org/annobin-%{version}.tar.xz
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# [Stolen from gcc-python-plugin]
# GCC will only load plugins that were built against exactly that build of GCC
# We thus need to embed the exact GCC version as a requirement within the
# metadata.
#
# Define "gcc_vr", a variable to hold the VERSION-RELEASE string for the gcc
# we are being built against.
#
# Unfortunately, we can't simply run:
# rpm -q --qf="%%{version}-%%{release}"
# to determine this, as there's no guarantee of a sane rpm database within
# the chroots created by our build system
#
# So we instead query the version from gcc's output.
#
# gcc.spec has:
# Version: %%{gcc_version}
# Release: %%{gcc_release}%%{?dist}
# ...snip...
# echo 'Red Hat %%{version}-%%{gcc_release}' > gcc/DEV-PHASE
#
# So, given this output:
#
# $ gcc --version
# gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
# Copyright (C) 2011 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# we can scrape out the "4.6.1" from the version line.
#
# The following implements the above:
%global gcc_vr %(gcc --version | head -n 1 | sed -e 's|.*(Red\ Hat\ ||g' -e 's|)$||g')
# We need the major version of gcc.
%global gcc_major %(echo "%{gcc_vr}" | cut -f1 -d".")
%global gcc_next %(v="%{gcc_major}"; echo $((++v)))
# Needed when building the srpm.
%if 0%{?gcc_major} == 0
%global gcc_major 0
%endif
# This is a gcc plugin, hence gcc is required.
%if %{with_hard_gcc_version_requirement}
# BZ 1607430 - There is an exact requirement on the major version of gcc.
Requires: (gcc >= %{gcc_major} with gcc < %{gcc_next})
%else
Requires: gcc
%endif
BuildRequires: gcc gcc-plugin-devel gcc-c++ BuildRequires: gcc gcc-plugin-devel gcc-c++
%description %description
Provides a plugin for GCC that records extra information in the files Provides a plugin for GCC that records extra information in the files
that it compiles and a set of scripts that can analyze the recorded that it compiles.
information.
Note - the plugin is automatically enabled in gcc builds via flags Note - the plugin is automatically enabled in gcc builds via flags
provided by the redhat-rpm-macros package. provided by the redhat-rpm-macros package.
@ -82,58 +137,16 @@ hardening options.
%global ANNOBIN_PLUGIN_DIR %(gcc --print-file-name=plugin) %global ANNOBIN_PLUGIN_DIR %(gcc --print-file-name=plugin)
# [Stolen from gcc-python-plugin]
# GCC will only load plugins that were built against exactly that build of GCC
# We thus need to embed the exact GCC version as a requirement within the
# metadata.
#
# Define "gcc_vr", a variable to hold the VERSION-RELEASE string for the gcc
# we are being built against.
#
# Unfortunately, we can't simply run:
# rpm -q --qf="%%{version}-%%{release}"
# to determine this, as there's no guarantee of a sane rpm database within
# the chroots created by our build system
#
# So we instead query the version from gcc's output.
#
# gcc.spec has:
# Version: %%{gcc_version}
# Release: %%{gcc_release}%%{?dist}
# ...snip...
# echo 'Red Hat %%{version}-%%{gcc_release}' > gcc/DEV-PHASE
#
# So, given this output:
#
# $ gcc --version
# gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
# Copyright (C) 2011 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# we can scrape out the "4.6.1" from the version line.
#
# The following implements the above:
%global gcc_vr %(gcc --version | head -n 1 | sed -e 's|.*(Red\ Hat\ ||g' | sed -e 's|)$||g')
# This is a gcc plugin, hence gcc is required.
%if %{with_hard_gcc_version_requirement}
Requires: gcc == %{gcc_vr}
BuildRequires: gcc == %{gcc_vr}
%else
Requires: gcc
%endif
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%prep %prep
if [ -z "%{gcc_vr}" ]; then if [ -z "%{gcc_vr}" ]; then
echo "*** Missing gcc_vr spec file macro, cannot continue." >&2 echo "*** Missing gcc_vr spec file macro, cannot continue." >&2
exit 1 exit 1
fi fi
echo "Requires: (gcc >= %{gcc_major} with gcc < %{gcc_next})"
%autosetup -p1 %autosetup -p1
# The plugin has to be configured with the same arcane configure # The plugin has to be configured with the same arcane configure
@ -157,7 +170,10 @@ touch doc/annobin.info
# that it should be OK. # that it should be OK.
cp plugin/.libs/annobin.so.0.0.0 %{_tmppath}/tmp_annobin.so cp plugin/.libs/annobin.so.0.0.0 %{_tmppath}/tmp_annobin.so
make -C plugin clean make -C plugin clean
make -C plugin CXXFLAGS="%{optflags} -fplugin=%{_tmppath}/tmp_annobin.so -fplugin-arg-tmp_annobin-rename" BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so -fplugin-arg-tmp_annobin-rename"
# If building on RHEL7, enable the next option as the .attach_to_group assembler pseudo op is not available in the assembler.
# BUILD_FLAGS="$BUILD_FLAGS -fplugin-arg-tmp_annobin-no-attach"
make -C plugin CXXFLAGS="%{optflags} $BUILD_FLAGS"
rm %{_tmppath}/tmp_annobin.so rm %{_tmppath}/tmp_annobin.so
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@ -170,7 +186,11 @@ rm %{_tmppath}/tmp_annobin.so
%if %{with tests} %if %{with tests}
%check %check
# On RHEL7 the assembler does not support all of the annobin tests.
make check make check
if [ -f tests/test-suite.log ]; then
cat tests/test-suite.log
fi
%endif %endif
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@ -200,6 +220,76 @@ make check
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%changelog %changelog
* Tue Aug 06 2019 Nick Clifton <nickc@redhat.com> - 8.78-1
- Fix a memory allocation error in the annobin plugin. (#1737306)
* Mon Aug 05 2019 Nick Clifton <nickc@redhat.com> - 8.77-2
- NVR bump to allow rebuilding against latest gcc.
* Mon Jun 24 2019 Nick Clifton <nickc@redhat.com> - 8.77-1
- Another attempt at fixing the detection and reporting of missing -D_FORTIFY_SOURCE options. (#1703500)
* Thu Jun 13 2019 Nick Clifton <nickc@redhat.com> - 8.76-2
- Release bump in order to allow rebuild against latest version of gcc in RHEL-8 buildroot. (#1720179)
* Tue Jun 04 2019 Nick Clifton <nickc@redhat.com> - 8.76-1
- Report a missing -D_FORTIFY_SOUCRE option if -D_GLIBCXX_ASSERTIONS was detected. (#1703500)
- Do not report problems with -fstack-protection if the binary was not built by gcc or clang. (#1703788)
- Add tests of clang command line options recorded in the DW_AT_producer attribute.
* Fri May 10 2019 Nick Clifton <nickc@redhat.com> - 8.73-2
- Release bump in order to allow rebuild against latest version of gcc in RHEL-8 buildroot. (#1657912)
* Wed Apr 24 2019 Nick Clifton <nickc@redhat.com> - 8.73-1
- Fix test for an executable stack segment. (#1700924)
* Thu Feb 28 2019 Nick Clifton <nickc@redhat.com> - 8.71-1
- Annobin: Suppress more calls to free() which are triggering memory checker errors. (#1684148)
* Fri Feb 01 2019 Nick Clifton <nickc@redhat.com> - 8.70-1
- Add section flag matching ability to section size tool.
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.69-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jan 29 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-6
- Use 'with' for rich dependency on gcc
* Tue Jan 29 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-5
- Really fix rhbz#1607430.
* Mon Jan 28 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-4
- Rebuilt with annotations enabled
* Mon Jan 28 2019 Björn Esser <besser82@fedoraproject.org> - 8.69-3
- Fix rpm query for gcc version.
* Mon Jan 28 2019 Nick Clifton <nickc@redhat.com> - 8.69-2
- Add an exact requirement on the major version of gcc. (#1607430)
* Thu Jan 24 2019 Nick Clifton <nickc@redhat.com> - 8.69-1
- Annobin: Add support for .text.startup and .text.exit sections generated by gcc 9.
- Annocheck: Add a note displaying tool.
* Wed Jan 23 2019 Nick Clifton <nickc@redhat.com> - 8.68-1
- Annocheck: Skip checks for -D_FORTIFY_SOURCE and -D_GLIBCXX_ASSERTIONS if there is no compiler generated code in the binary.
* Mon Jan 21 2019 Björn Esser <besser82@fedoraproject.org> - 8.67-3
- Rebuilt with annotations enabled
* Mon Jan 21 2019 Björn Esser <besser82@fedoraproject.org> - 8.67-2
- Rebuilt for GCC 9
* Thu Jan 17 2019 Nick Clifton <nickc@redhat.com> - 8.67-1
- Annocheck: Only skip specific checks for specific symbols. (#1666823)
- Annobin: Record the setting of the -fomit-frame-pointer option. (#1657912)
* Wed Jan 02 2019 Nick Clifton <nickc@redhat.com> - 8.66-1
- Annocheck: Do not ignore -Og when checking to see if an optimization level has been set. (#1624162)
* Tue Dec 11 2018 Nick Clifton <nickc@redhat.com> - 8.65-1
- Annobin: Fix handling of multiple .text.unlikely sections.
* Fri Nov 30 2018 Nick Clifton <nickc@redhat.com> - 8.64-1 * Fri Nov 30 2018 Nick Clifton <nickc@redhat.com> - 8.64-1
- Annocheck: Skip gaps in PPC64 executables covered by start_bcax_ symbols. (#1630564) - Annocheck: Skip gaps in PPC64 executables covered by start_bcax_ symbols. (#1630564)