From a4baf7f0a6e5deffc1973bfddb4d5268fdb14efd Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 1 Aug 2024 10:56:07 +0100 Subject: [PATCH] Spec File: Remove spurious dash from install path of gcc plugin. (RHEL-51183) --- annobin.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/annobin.spec b/annobin.spec index 4553a2d..32b40f6 100644 --- a/annobin.spec +++ b/annobin.spec @@ -9,7 +9,7 @@ BuildRequires: scl-utils-build Name: %{?scl_prefix}annobin Summary: Annotate and examine compiled binary files Version: 12.65 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL-3.0-or-later AND LGPL-2.0-or-later AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND GFDL-1.3-or-later URL: https://sourceware.org/annobin/ # Maintainer: nickc@redhat.com @@ -366,7 +366,9 @@ Installs an annobin plugin that can be used by Clang. # FIXME: This is going to need to be updated every time we bootstrap. Find # a better way. -%global ANNOBIN_GCC_PLUGIN_DIR /opt/rh/%{scl_prefix}/root/usr/lib/gcc/x86_64-redhat-linux/13/plugin +%global GTS_GCC_MAJOR_VERSION 13 + +%global ANNOBIN_GCC_PLUGIN_DIR %{_scl_root}/usr/lib/gcc/x86_64-redhat-linux/%{GTS_GCC_MAJOR_VERSION}/plugin %else @@ -454,15 +456,17 @@ export LDFLAGS="$LDFLAGS %build_ldflags -L%{?_scl_root}/usr/lib64 -L%{?_scl_root %ifarch %{ix86} x86_64 export CLANG_TARGET_OPTIONS="-fcf-protection" %endif + %ifarch aarch64 export CLANG_TARGET_OPTIONS="-mbranch-protection=standard" %endif + %ifnarch riscv64 export CLANG_TARGET_OPTIONS="$CLANG_TARGET_OPTIONS -flto" %endif -# Override the default fortification level used by the Clang and LLVM plugins. -export PLUGIN_FORTIFY_OPTION="-D_FORTIFY_SOURCE=3" +# # Override the default fortification level used by the Clang and LLVM plugins. +# export PLUGIN_FORTIFY_OPTION="-D_FORTIFY_SOURCE=3" CC=%gcc_for_annobin CXX=%gxx_for_annobin CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CXXFLAGS="$CFLAGS" %configure ${CONFIG_ARGS} || cat config.log @@ -527,7 +531,7 @@ mv %{buildroot}/%{llvm_plugin_dir}/annobin-for-clang.so %{buildroot}/%{clang_plu # Note - we cannot just store %%{gcc_vr} as sometimes the gcc rpm version changes # without the NVR being altered. See BZ #2030671 for more discussion on this. mkdir -p %{buildroot}/%{ANNOBIN_GCC_PLUGIN_DIR} -cat `gcc --print-file-name=rpmver` > %{buildroot}/%{ANNOBIN_GCC_PLUGIN_DIR}/%{aver} +cat `%gcc_for_annobin --print-file-name=rpmver` > %{buildroot}/%{ANNOBIN_GCC_PLUGIN_DIR}/%{aver} # Also install a copy of the sources into the build tree. mkdir -p %{buildroot}%{annobin_source_dir} @@ -617,6 +621,9 @@ make check GCC=%gcc_for_annobin #--------------------------------------------------------------------------------- %changelog +* Thu Aug 01 2024 Nick Clifton - 12.65-2 +- Spec File: Remove spurious dash from install path of gcc plugin. (RHEL-51183) + * Tue Jul 30 2024 Nick Clifton - 12.65-1 - Rebase to 12.65. (RHEL-51056) - Annocheck: Fix recording arguments for later re-use. (RHEL-50802) @@ -635,6 +642,8 @@ make check GCC=%gcc_for_annobin - Annocheck: Remove some false positives for Rust binaries. (#2280239) - Annocheck: Defer passing the branch protection test until all notes have been checked. - GCC Plugin: Add extra code for detecting the branch protection setting. (RHEL-35958) + +* Fri Jul 26 2024 Nick Clifton - 12.52-5 - Spec File: Hard code the gcc plugin directory when boostrapping. (RHEL-50148) * Tue May 07 2024 Nick Clifton - 12.52-3