Enable Clang and LLVM plugins (without LTO)

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-04-28 18:40:37 +03:00
parent f29922cedf
commit ffcc09a3c1
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 47 additions and 9 deletions

View File

@ -0,0 +1,40 @@
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

@ -2,7 +2,7 @@
Name: annobin
Summary: Annotate and examine compiled binary files
Version: 12.02
Release: 1.0.riscv64%{?dist}
Release: 1.1.riscv64%{?dist}
License: GPLv3+
URL: https://sourceware.org/annobin/
# Maintainer: nickc@redhat.com
@ -25,21 +25,13 @@ URL: https://sourceware.org/annobin/
%bcond_with debuginfod
# Use "--without clangplugin" to disable the building of the annobin plugin for Clang.
%ifnarch riscv64
%bcond_without clangplugin
%else
%bcond_with clangplugin
%endif
# Use "--without gccplugin" to disable the building of the annobin plugin for GCC.
%bcond_without gccplugin
# Use "--without llvmplugin" to disable the building of the annobin plugin for LLVM.
%ifnarch riscv64
%bcond_without llvmplugin
%else
%bcond_with llvmplugin
%endif
# 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
@ -77,6 +69,8 @@ Source: https://nickc.fedorapeople.org/%{annobin_sources}
# Insert patches here, if needed. Eg:
# Patch01: annobin-foo.patch
Patch01: 0001-Remove-flto-from-Clang-LLVM-plugins.patch
#---------------------------------------------------------------------------------
# Make sure that the necessary sub-packages are built.
@ -530,6 +524,10 @@ fi
#---------------------------------------------------------------------------------
%changelog
* Fri Apr 28 2023 David Abdurachmanov <davidlt@rivosinc.com> - 12.02-1.1.riscv64
- Enable Clang and LLVM plugins on riscv64
- Disable LTO on riscv64 (for Clang and LLVM)
* Mon Apr 17 2023 David Abdurachmanov <davidlt@rivosinc.com> - 12.02-1.0.riscv64
- Disable Clang and LLVM plugings on riscv64