diff --git a/annobin.spec b/annobin.spec index aab36c9..78d5ec9 100644 --- a/annobin.spec +++ b/annobin.spec @@ -1,7 +1,7 @@ Name: annobin Summary: Annotate and examine compiled binary files -Version: 12.46 +Version: 12.47 Release: 1%{?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/ @@ -371,8 +371,7 @@ export CFLAGS="$CFLAGS -DAARCH64_BRANCH_PROTECTION_SUPPORTED=1" export CFLAGS="$CFLAGS $RPM_OPT_FLAGS %build_cflags" export LDFLAGS="$LDFLAGS %build_ldflags" -# Set target-specific security options to be used when building the -# Clang and LLVM plugins. +# Set target-specific options to be used when building the Clang and LLVM plugins. # FIXME: There should be a better way to do this. %ifarch %{ix86} x86_64 export CLANG_TARGET_OPTIONS="-fcf-protection" @@ -380,6 +379,12 @@ export CLANG_TARGET_OPTIONS="-fcf-protection" %ifarch aarch64 export CLANG_TARGET_OPTIONS="-mbranch-protection=standard" %endif +%ifnarch risv64 +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" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CXXFLAGS="$CFLAGS" %configure ${CONFIG_ARGS} || cat config.log @@ -413,12 +418,14 @@ rm %{_tmppath}/tmp_annobin.so %if %{with clangplugin} cp clang-plugin/annobin-for-clang.so %{_tmppath}/tmp_annobin.so -make -C clang-plugin all CXXFLAGS="$OPTS $BUILD_FLAGS" +# To enable verbose more in the plugin append the following: ANNOBIN="verbose" +make -C clang-plugin clean all CLANG_TARGET_OPTIONS="$CLANG_TARGET_OPTIONS $BUILD_FLAGS" %endif %if %{with llvmplugin} cp llvm-plugin/annobin-for-llvm.so %{_tmppath}/tmp_annobin.so -make -C llvm-plugin all CXXFLAGS="$OPTS $BUILD_FLAGS" +# To enable verbose more in the plugin append the following: ANNOBIN_VERBOSE="true" +make -C llvm-plugin clean all CLANG_TARGET_OPTIONS="$CLANG_TARGET_OPTIONS $BUILD_FLAGS" %endif # endif for %%if {with_plugin_rebuild} @@ -523,6 +530,10 @@ make check #--------------------------------------------------------------------------------- %changelog +* Wed Mar 27 2024 Nick Clifton - 12.47-1 +- Clang & LLVM Plugins: Allow environment to override fortification level. (RHEL-30579) +- Spec File: Override fortification level and set it to 3. + * Mon Mar 25 2024 Tulio Magno Quites Machado Filho - 12.46-1 - Annocheck: Improve detection of -mbranch-protection option. - Clang Plugin: Add global-file-syms option. diff --git a/sources b/sources index bc5c161..6ff094a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (annobin-12.46.tar.xz) = 6805298e1168dbdd287e706a5d58de0cf06d715b40254f33d757b356b5655f0d1ddc519c478b836c7b8ee89813982b35fc5bec6384a010e40e0d56888d6eb5b2 +SHA512 (annobin-12.47.tar.xz) = 3182a948e9ec2b06943fbeace9c6b5cda457e5fe227e702f851592d98f2291959e1969e67c1ef70a509ededc1c2500ab0243f2a317dc4c8a205246cab457a2ba