From fe3c6e85c75c47d86b1825e1a9d46b36a1231497 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 30 Mar 2021 12:01:21 -0400 Subject: [PATCH] import gcc-toolset-10-annobin-9.29-1.el8 --- .gcc-toolset-10-annobin.metadata | 2 +- .gitignore | 2 +- SPECS/annobin.spec | 67 +++++++++++++++++++++++++++----- 3 files changed, 59 insertions(+), 12 deletions(-) diff --git a/.gcc-toolset-10-annobin.metadata b/.gcc-toolset-10-annobin.metadata index 3d8e1cc..8785afc 100644 --- a/.gcc-toolset-10-annobin.metadata +++ b/.gcc-toolset-10-annobin.metadata @@ -1 +1 @@ -0cb8f1f99f4be6430d96441712eb59e739a9d817 SOURCES/annobin-9.21.tar.xz +dd46f2449462370395c536f20a40c68ffabb086d SOURCES/annobin-9.29.tar.xz diff --git a/.gitignore b/.gitignore index f84422a..1c99568 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/annobin-9.21.tar.xz +SOURCES/annobin-9.29.tar.xz diff --git a/SPECS/annobin.spec b/SPECS/annobin.spec index aacd7b1..c47983e 100644 --- a/SPECS/annobin.spec +++ b/SPECS/annobin.spec @@ -4,8 +4,8 @@ Name: %{?scl_prefix}annobin Summary: Annotate and examine compiled binary files -Version: 9.21 -Release: 3%{?dist} +Version: 9.29 +Release: 1%{?dist} License: GPLv3+ # ProtocolURL: https://fedoraproject.org/wiki/Toolchain/Watermark # Maintainer: nickc@redhat.com @@ -25,9 +25,12 @@ License: GPLv3+ # time check for debuginfod support. %bcond_with debuginfod -# Use "--with clangplugin" to build the annobin plugin for clang. +# Use "--with clangplugin" to build the annobin plugin for Clang. %bcond_with clangplugin +# Use "--with llvmplugin" to build the annobin plugin for LLVM. +%bcond_with llvmplugin + # 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 # checking logic or when building on RHEL-7 or earlier. @@ -126,6 +129,9 @@ BuildRequires: %{?scl_prefix}gcc %{?scl_prefix}gcc-plugin-devel %{?scl_prefix}gc %if %{with clangplugin} BuildRequires: %{?scl_prefix}clang %{?scl_prefix}clang-devel %{?scl_prefix}llvm %{?scl_prefix}llvm-devel %endif +%if %{with llvmplugin} +BuildRequires: %{?scl_prefix}clang %{?scl_prefix}clang-devel %{?scl_prefix}llvm %{?scl_prefix}llvm-devel %{?scl_prefix}compiler-rt +%endif %description Provides a plugin for GCC that records extra information in the files @@ -138,6 +144,10 @@ provided by the redhat-rpm-macros package. Also provides a plugin for clang which performs a similar function. %endif +%if %{with llvmplugin} +Also provides a plugin for LLVM which performs a similar function. +%endif + #--------------------------------------------------------------------------------- %if %{with tests} @@ -181,6 +191,8 @@ hardening options. # Instead it just uses dlopen() with no pathname prefix. So we # construct a (hopefully good) path and rely upon users of annobin # knowing about this location. +# FIXME2: Currently this same path is hardcoded into the Makefile.in +# files in the clang-plugin and llvm-plugin source directories... %global ANNOBIN_CLANG_PLUGIN_DIR %{?scl_prefix}/usr/lib64/clang/%(clang -dumpversion)/lib %endif @@ -211,8 +223,10 @@ touch doc/annobin.info %build +CONFIG_ARGS= + %if %{with debuginfod} -%configure --quiet --with-gcc-plugin-dir=%{ANNOBIN_GCC_PLUGIN_DIR} CC=%gcc_for_annobin CXX=%gxx_for_annobin --with-debuginfod || cat config.log +CONFIG_ARGS="$CONFIG_ARGS --with-debuginfod" %else # Note - we explicitly disable debuginfod support if it was not configured. # This is because by default annobin's configue script will assume --with-debuginfod=auto @@ -220,10 +234,25 @@ touch doc/annobin.info # may well be, but the build time environment may not match the run time # environment, and the rpm will not have a Requirement on the debuginfod # client. -%configure --quiet --with-gcc-plugin-dir=%{ANNOBIN_GCC_PLUGIN_DIR} CC=%gcc_for_annobin CXX=%gxx_for_annobin --with-debuginfod=no || cat config.log +CONFIG_ARGS="$CONFIG_ARGS --without-debuginfod" %endif +%if %{with clangplugin} +CONFIG_ARGS="$CONFIG_ARGS --with-clang" +%endif + +%if %{with llvmplugin} +CONFIG_ARGS="$CONFIG_ARGS --with-llvm" +%endif + +%if %{without tests} +CONFIG_ARGS="$CONFIG_ARGS --without-test" +%endif + +%configure --quiet --with-gcc-plugin-dir=%{ANNOBIN_GCC_PLUGIN_DIR} CC=%gcc_for_annobin CXX=%gxx_for_annobin ${CONFIG_ARGS} || cat config.log + %make_build + # Rebuild the plugin, this time using the plugin itself! This # ensures that the plugin works, and that it contains annotations # of its own. This could mean that we end up with a plugin with @@ -269,18 +298,19 @@ if [ -f tests/test-suite.log ]; then fi %if %{with clangplugin} -# FIXME: Add tests of the clang plugin. +# FIXME: RUN CLANG tests %endif + +%if %{with llvmplugin} +# FIXME: RUN LLVM tests +%endif + %endif #--------------------------------------------------------------------------------- %files %{ANNOBIN_GCC_PLUGIN_DIR} -%{_bindir}/built-by -%{_bindir}/check-abi -%{_bindir}/hardened -%{_bindir}/run-on-binaries-in %license COPYING3 LICENSE %exclude %{_datadir}/doc/annobin-plugin/COPYING3 %exclude %{_datadir}/doc/annobin-plugin/LICENSE @@ -295,6 +325,9 @@ fi %if %{with clangplugin} %{ANNOBIN_CLANG_PLUGIN_DIR} %endif +%if %{with llvmplugin} +%{ANNOBIN_CLANG_PLUGIN_DIR} +%endif %if %{with annocheck} %files annocheck @@ -305,6 +338,20 @@ fi #--------------------------------------------------------------------------------- %changelog +* Fri Aug 28 2020 Nick Clifton - 9.29-1 +- Fix AArch64 checks in annobin plugin. (#1873416) +- gcc plugin: Detect any attempt to access the global_options array. +- gcc plugin: Do not complain about missing pre-processor options when examining a preprocessed input file. (#1862718) +- Use more robust checks for AArch64 options. +- Detect CLANG compiled assembler that is missing IBT support. +- Improved target pointer size discovery. +- Add support for installing clang and llvm plugins. +- Temporary suppression of aarch64 pointer size check. (#1860549) + +* Mon Jul 13 2020 Nick Clifton - 9.23-2 +- Annocheck: Do not skip tests of the short-enums notes. (#1743635) +- Add (optional) llvm plugin. + * Wed Jun 10 2020 Nick Clifton - 9.21-3 - Fix the computations of ANNOBIN_GCC_PLUGIN_DIR and ANNOBIN_CLANG_PLUGIN_DIR.