Spec File: Use a different method to disable the annobin plugin.

Resolves: #2054571
This commit is contained in:
Nick Clifton 2022-02-15 16:52:06 +00:00
parent f79bb7e490
commit 6e52b71f81
1 changed files with 9 additions and 12 deletions

View File

@ -2,7 +2,7 @@
Name: annobin
Summary: Annotate and examine compiled binary files
Version: 10.54
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3+
# Maintainer: nickc@redhat.com
# Web Page: https://sourceware.org/annobin/
@ -178,7 +178,7 @@ hardening options.
%global ANNOBIN_GCC_PLUGIN_DIR %(gcc --print-file-name=plugin)
%{!?llvm_version:%global llvm_version 12.0.1}
%{!?llvm_version:%global llvm_version 13.0.1}
%{!?llvm_plugin_dir:%global llvm_plugin_dir %{_libdir}/llvm/%{llvm_version}}
%{!?clang_plugin_dir:%global clang_plugin_dir %{_libdir}/clang/%{llvm_version}}
@ -268,30 +268,24 @@ make -C gcc-plugin clean
BUILD_FLAGS="-fplugin=%{_tmppath}/tmp_annobin.so"
# Disable the standard annobin plugin so that we do get conflicts.
# Note: the "-fplugin=annobin" is here, despite the fact that it will also
# be automatically added to the gcc command line via
# "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" because of a bug in gcc's
# plugin command line options handling. GCC will issue an error saying that
# there is no plugin called "annobin" matching the -fplugin-arg-annobin-disable
# option, despite the fact that there patently is.
BUILD_FLAGS="$BUILD_FLAGS -fplugin=annobin -fplugin-arg-annobin-disable"
OPTS="$(rpm --eval '%undefine _annotated_build %build_cflags %build_ldflags')"
# 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 gcc-plugin CXXFLAGS="%{optflags} $BUILD_FLAGS"
make -C gcc-plugin CXXFLAGS="$OPTS $BUILD_FLAGS"
rm %{_tmppath}/tmp_annobin.so
%endif
%if %{with clangplugin}
cp clang-plugin/annobin-for-clang.so %{_tmppath}/tmp_annobin.so
make -C clang-plugin all CXXFLAGS="%{optflags} $BUILD_FLAGS"
make -C clang-plugin all CXXFLAGS="$OPTS $BUILD_FLAGS"
%endif
%if %{with llvmplugin}
cp llvm-plugin/annobin-for-llvm.so %{_tmppath}/tmp_annobin.so
make -C llvm-plugin all CXXFLAGS="%{optflags} $BUILD_FLAGS"
make -C llvm-plugin all CXXFLAGS="$OPTS $BUILD_FLAGS"
%endif
%endif
@ -375,6 +369,9 @@ fi
#---------------------------------------------------------------------------------
%changelog
* Tue Feb 15 2022 Nick Clifton <nickc@redhat.com> - 10.54-2
- Spec File: Use a different method to disable the annobin plugin (#2054571)
* Mon Feb 14 2022 Nick Clifton <nickc@redhat.com> - 10.54-1
- Annocheck: Accept static GO binaries. (#2053606)