Disable LTO on riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-10-13 08:45:29 +03:00
parent 750a3f0ebd
commit 1e2417e87a
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
2 changed files with 46 additions and 1 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.28
Release: 1%{?dist}
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/
# Maintainer: nickc@redhat.com
@ -69,6 +69,8 @@ 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.
@ -524,6 +526,9 @@ make check
#---------------------------------------------------------------------------------
%changelog
* Fri Oct 13 2023 David Abdurachmanov <davidlt@rivosinc.com> - 12.28-1.0.riscv64
- Disable LTO on riscv64 (for Clang and LLVM)
* Fri Oct 06 2023 Nick Clifron <nickc@redhat.com> - 12.28-1
- GCC Plugin: Record settings of -Wstrict-flex-arrays and -fstrict-flex-arrays
- Annobin: Add future test of these options.