Add JITLink patch to fix clang failures on aarch64 with libgcc-13

This commit is contained in:
Tom Stellard 2023-03-14 20:37:30 +00:00 committed by Timm Bäder
parent de1386c84e
commit 693269178f
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,30 @@
From a95a465154273e59a32e406678ea0ebda6596fce Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 14 Mar 2023 13:11:52 -0400
Subject: [PATCH] JITLink: Add missing EHFrame NULL terminator on aarch64/ELF
This fixes test failures on AArch64 with libgcc-13:
Clang :: Interpreter/global-dtor.cpp
Clang-Unit :: Interpreter/./ClangReplInterpreterTests/2/4
Differential Revision: https://reviews.llvm.org/D146067
---
llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp
index 5b9553ec8b11..3eb7e1bccde7 100644
--- a/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp
@@ -552,6 +552,7 @@ void link_ELF_aarch64(std::unique_ptr<LinkGraph> G,
Config.PrePrunePasses.push_back(EHFrameEdgeFixer(
".eh_frame", 8, aarch64::Pointer32, aarch64::Pointer64,
aarch64::Delta32, aarch64::Delta64, aarch64::NegDelta32));
+ Config.PrePrunePasses.push_back(EHFrameNullTerminator(".eh_frame"));
// Add a mark-live pass.
if (auto MarkLive = Ctx->getMarkLivePass(TT))
--
2.31.1

View file

@ -128,6 +128,9 @@ Source6: release-keys.asc
# RHEL-specific patch to avoid unwanted python3-myst-parser dep
Patch101: 0101-Deactivate-markdown-doc.patch
# https://reviews.llvm.org/D146067
Patch0: 0001-JITLink-Add-missing-EHFrame-NULL-terminator-on-aarch.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: clang