From b6dee0918ec2acb001c254e382e386db9b89bb3f8392050bf265c7c4eeb1c1c6 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Wed, 14 Jun 2023 19:34:37 +0000 Subject: [PATCH 1/2] Accepting request 1093062 from home:Guillaume_G:branches:devel:tools:compiler - Add patch to fix segmentation fault on aarch64 - boo#1212264: * llvm14-fix-segfault-on-aarch64.patch OBS-URL: https://build.opensuse.org/request/show/1093062 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=52 --- llvm14-fix-segfault-on-aarch64.patch | 31 ++++++++++++++++++++++++++++ llvm14.changes | 6 ++++++ llvm14.spec | 3 +++ 3 files changed, 40 insertions(+) create mode 100644 llvm14-fix-segfault-on-aarch64.patch diff --git a/llvm14-fix-segfault-on-aarch64.patch b/llvm14-fix-segfault-on-aarch64.patch new file mode 100644 index 0000000..80f7954 --- /dev/null +++ b/llvm14-fix-segfault-on-aarch64.patch @@ -0,0 +1,31 @@ +From 2e1b838a889f9793d4bcd5dbfe10db9796b77143 Mon Sep 17 00:00:00 2001 +From: Graham Markall +Date: Mon, 3 Apr 2023 11:15:36 -0700 +Subject: [PATCH] [RuntimeDyld] RuntimeDyldELF: Clear GOTOffsetMap when + resetting GOT section. + +When the GOT section ID is reset, the GOTOffsetMap must also be cleared, +otherwise spurious matches can be located when handling GOT relocations +in subsequently-linked objects. + +Fixes Issue #61402 - see https://github.com/llvm/llvm-project/issues/61402. + +Reviewed By: lhames + +Differential Revision: https://reviews.llvm.org/D146938 +--- + llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +index 3c7f4ec47eb84..282c357f2de2c 100644 +--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp ++++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +@@ -2406,6 +2406,7 @@ Error RuntimeDyldELF::finalizeLoad(const ObjectFile &Obj, + } + } + ++ GOTOffsetMap.clear(); + GOTSectionID = 0; + CurrentGOTIndex = 0; + diff --git a/llvm14.changes b/llvm14.changes index 4c56d43..58ff73a 100644 --- a/llvm14.changes +++ b/llvm14.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 13 08:13:42 UTC 2023 - Guillaume GARDET + +- Add patch to fix segmentation fault on aarch64 - boo#1212264: + * llvm14-fix-segfault-on-aarch64.patch + ------------------------------------------------------------------- Fri May 5 21:48:49 UTC 2023 - Aaron Puchert diff --git a/llvm14.spec b/llvm14.spec index 09db867..afe8bb4 100644 --- a/llvm14.spec +++ b/llvm14.spec @@ -381,6 +381,8 @@ Patch36: clang-test-xfail-gnuless-triple.patch Patch37: llvm-preserve-symbols-used.patch # Fix build with Swig 4.1.0: backport of upstream commits 81fc5f7909a4, f0a25fe0b746. (gh#llvm/llvm-project#58018) Patch38: lldb-swig-4.1.0-build-fix.patch +# Cherry pick from rust llvm project (https://reviews.llvm.org/D146938) - boo#1212264 +Patch39: llvm14-fix-segfault-on-aarch64.patch BuildRequires: binutils-devel >= 2.21.90 BuildRequires: cmake >= 3.13.4 BuildRequires: fdupes @@ -811,6 +813,7 @@ This package contains the development files for Polly. %patch27 -p2 %patch33 -p2 %patch37 -p2 +%patch39 -p2 pushd clang-%{_version}.src %patch2 -p1 From a707a3c5dbc069ac67fd7aeb3b9725e7051cc9746c5ad8278699cc84afc17803 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Fri, 16 Jun 2023 01:11:59 +0000 Subject: [PATCH 2/2] - Make python3-clang noarch again and fix conflicts/provides to point to %python3_sitelib instead of %python3_sitearch. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=53 --- llvm14.changes | 6 ++++++ llvm14.spec | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/llvm14.changes b/llvm14.changes index 58ff73a..afe2932 100644 --- a/llvm14.changes +++ b/llvm14.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 15 23:45:39 UTC 2023 - Aaron Puchert + +- Make python3-clang noarch again and fix conflicts/provides to + point to %python3_sitelib instead of %python3_sitearch. + ------------------------------------------------------------------- Tue Jun 13 08:13:42 UTC 2023 - Guillaume GARDET diff --git a/llvm14.spec b/llvm14.spec index afe8bb4..d8ed6de 100644 --- a/llvm14.spec +++ b/llvm14.spec @@ -677,8 +677,9 @@ Summary: Python bindings for libclang Group: Development/Libraries/Python Requires: libclang%{_soclang} >= %{version} Requires: python3-base -Conflicts: %{python3_sitearch}/clang/ -Provides: %{python3_sitearch}/clang/ +Conflicts: %{python3_sitelib}/clang/ +Provides: %{python3_sitelib}/clang/ +BuildArch: noarch %description -n python3-clang%{_sonum} This package contains the Python bindings to clang (C language)