Merge remote-tracking branch 'up/f40' into f40-riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2024-04-22 11:44:42 +03:00
commit c978b406e0
Signed by: davidlt
GPG Key ID: 7A5F42FAF91FACC3
3 changed files with 24 additions and 56 deletions

View File

@ -1,40 +0,0 @@
From fdc6708a31f3569547daffbc4196c1c25fa2e1da Mon Sep 17 00:00:00 2001
From: David Abdurachmanov <davidlt@rivosinc.com>
Date: Fri, 28 Apr 2023 15:37:28 +0000
Subject: [PATCH] Remove -flto from Clang & LLVM plugins
This requres LLVMgold.so, which is not supported right now.
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
---
clang-plugin/Makefile.in | 1 -
llvm-plugin/Makefile.in | 1 -
2 files changed, 2 deletions(-)
diff --git a/clang-plugin/Makefile.in b/clang-plugin/Makefile.in
index 5e4dc24..26cd5d9 100644
--- a/clang-plugin/Makefile.in
+++ b/clang-plugin/Makefile.in
@@ -14,7 +14,6 @@ PLUGIN_OPTIONS = \
-fPIC \
-Wall \
-O2 \
- -flto \
-g -grecord-gcc-switches \
-Wl,--build-id=md5 \
-Wl,-z,now
diff --git a/llvm-plugin/Makefile.in b/llvm-plugin/Makefile.in
index 36d7c41..5009a39 100644
--- a/llvm-plugin/Makefile.in
+++ b/llvm-plugin/Makefile.in
@@ -14,7 +14,6 @@ PLUGIN_OPTIONS = \
-fPIC \
-Wall \
-O2 \
- -flto \
-g -grecord-gcc-switches \
-Wl,--build-id=md5 \
-Wl,-z,now
--
2.40.0

View File

@ -1,7 +1,7 @@
Name: annobin
Summary: Annotate and examine compiled binary files
Version: 12.46
Version: 12.49
Release: 1.0.riscv64%{?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/
@ -74,8 +74,6 @@ Source: https://nickc.fedorapeople.org/%{annobin_sources}
# Insert patches here, if needed. Eg:
# Patch01: annobin-plugin-default-string-notes.patch
Patch10: 0001-Remove-flto-from-Clang-LLVM-plugins.patch
#---------------------------------------------------------------------------------
# Make sure that the necessary sub-packages are built.
@ -365,30 +363,29 @@ CONFIG_ARGS="$CONFIG_ARGS --without-tests"
%if %{without annocheck}
CONFIG_ARGS="$CONFIG_ARGS --without-annocheck"
%else
# Fedora supports AArch64's -mbranch-protection=bti, RHEL does not.
%if 0%{?fedora} != 0
export CFLAGS="$CFLAGS -DAARCH64_BRANCH_PROTECTION_SUPPORTED=1"
%endif
%endif
%set_build_flags
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. FIXME: There should be a better way to do
# this.
# 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"
%endif
%ifarch aarch64
%if 0%{?fedora} != 0
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"
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CXXFLAGS="$CFLAGS" %configure ${CONFIG_ARGS} || cat config.log
%make_build
@ -421,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}
@ -531,8 +530,17 @@ make check
#---------------------------------------------------------------------------------
%changelog
* Sun Apr 14 2024 David Abdurachmanov <davidlt@rivosinc.com> - 12.46-1.0.risv64
- Disable LTO on riscv64
* Mon Apr 22 2024 David Abdurachmanov <davidlt@rivosinc.com> - 12.49-1.0.risv64
- Fix a typo in riscv64 arch
* Thu Apr 18 2024 Nick Clifton <nickc@redhat.com> - 12.49-1
- GCC Plugin: Disable active check for -Wimplicit-int for non-C sources. (#2275884)
- Annocheck: Ignore stack checks for AMD GPU binaries.
- Annocheck: Do not produce FAIL result for i686 binaries in the RHEL-10 profile.
- Annocheck: Test for __stack_chk_guard being writeable.
- Annocheck: Update heuristics for detecting glibc code in executables. (RHEL-30579)
- 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 <tuliom@redhat.com> - 12.46-1
- Annocheck: Improve detection of -mbranch-protection option.

View File

@ -1 +1 @@
SHA512 (annobin-12.46.tar.xz) = 6805298e1168dbdd287e706a5d58de0cf06d715b40254f33d757b356b5655f0d1ddc519c478b836c7b8ee89813982b35fc5bec6384a010e40e0d56888d6eb5b2
SHA512 (annobin-12.49.tar.xz) = 830e041b351a56be4c13a2962d358b59c174fc79448461e23e7e7b085bd0848cda0e36bbefb3ec83f4ed9041f776b20bf50bd7771a898ca6a78e2d3d91ad3b3c