From 8ef0cdb22da1fd3c96ff58c2e3221ef11e57dd2c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Jun 08 2021 17:41:09 +0000 Subject: Only enable -funwind-tables by default on Fedora arches .eh_frame sections confuse bpf tools, so -funwind-tables shouldn't be enabled there. There are other non-CPU arches where this could potentially cause problems, so be conservative and only enable this on CPU arches supported by Fedora. --- diff --git a/0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch b/0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch index 0a29dd4..5eb4b3b 100644 --- a/0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch +++ b/0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch @@ -1,40 +1,29 @@ -From 07b062e1f7c3359550aa8c0a7b86f6054971439d Mon Sep 17 00:00:00 2001 +From c87abee7356b8fde81512ffceadd520776c465d2 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 25 Feb 2021 14:09:29 +0100 -Subject: [PATCH 2/6] [PATCH][clang] Make -funwind-tables the default on all - archs +Subject: [PATCH] [PATCH][clang] Make -funwind-tables the default on all archs --- - clang/lib/Driver/ToolChain.cpp | 2 +- - clang/lib/Driver/ToolChains/Gnu.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + clang/lib/Driver/ToolChains/Gnu.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) -diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp -index b2ddef1..715b323 100644 ---- a/clang/lib/Driver/ToolChain.cpp -+++ b/clang/lib/Driver/ToolChain.cpp -@@ -257,7 +257,7 @@ std::string ToolChain::getInputFilename(const InputInfo &Input) const { - } - - bool ToolChain::IsUnwindTablesDefault(const ArgList &Args) const { -- return false; -+ return true; - } - - Tool *ToolChain::getClang() const { diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index 1d8a3cd..5deeb10 100644 +index a27841dc5985..7489e6785150 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp -@@ -2713,7 +2713,7 @@ bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const { +@@ -2709,6 +2709,12 @@ bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const { + case llvm::Triple::ppc64: + case llvm::Triple::ppc64le: case llvm::Triple::x86_64: ++ ++ // Enable -funwind-tables on all architectures supported by Fedora: ++ // rhbz#1655546 ++ case llvm::Triple::x86: ++ case llvm::Triple::systemz: ++ case llvm::Triple::arm: return true; default: -- return false; -+ return true; - } - } - + return false; -- -1.8.3.1 +2.27.0 diff --git a/clang.spec b/clang.spec index ec3a85b..10a6512 100644 --- a/clang.spec +++ b/clang.spec @@ -66,7 +66,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C language family front-end for LLVM License: NCSA @@ -532,6 +532,9 @@ false %endif %changelog +* Tue Jun 08 2021 Tom Stellard - 12.0.1~rc1-3 +- Only enable -funwind-tables by default on Fedora arches + * Fri Jun 04 2021 Python Maint - 12.0.1~rc1-2 - Rebuilt for Python 3.10