* llvm-21-aarch64.patch OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql16?expand=0&rev=65
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
From 0dceba21d74f01e63aa690879b44808bbb74a9c3 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Munro <tmunro@postgresql.org>
|
|
Date: Sat, 22 Nov 2025 20:51:16 +1300
|
|
Subject: [PATCH] jit: Adjust AArch64-only code for LLVM 21.
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
LLVM 21 changed the arguments of RTDyldObjectLinkingLayer's
|
|
constructor, breaking compilation with the backported
|
|
SectionMemoryManager from commit 9044fc1d.
|
|
|
|
https://github.com/llvm/llvm-project/commit/cd585864c0bbbd74ed2a2b1ccc191eed4d1c8f90
|
|
|
|
Backpatch-through: 14
|
|
Author: Holger Hoffstätte <holger@applied-asynchrony.com>
|
|
Reviewed-by: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
|
|
Discussion: https://postgr.es/m/d25e6e4a-d1b4-84d3-2f8a-6c45b975f53d%40applied-asynchrony.com
|
|
---
|
|
src/backend/jit/llvm/llvmjit_wrap.cpp | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/src/backend/jit/llvm/llvmjit_wrap.cpp b/src/backend/jit/llvm/llvmjit_wrap.cpp
|
|
index da850d67ab647..c31a57b8563e8 100644
|
|
--- a/src/backend/jit/llvm/llvmjit_wrap.cpp
|
|
+++ b/src/backend/jit/llvm/llvmjit_wrap.cpp
|
|
@@ -53,7 +53,14 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(llvm::orc::ObjectLayer, LLVMOrcObjectLayerRef
|
|
LLVMOrcObjectLayerRef
|
|
LLVMOrcCreateRTDyldObjectLinkingLayerWithSafeSectionMemoryManager(LLVMOrcExecutionSessionRef ES)
|
|
{
|
|
+#if LLVM_VERSION_MAJOR >= 21
|
|
+ return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
|
|
+ *unwrap(ES), [](const llvm::MemoryBuffer&) {
|
|
+ return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true);
|
|
+ }));
|
|
+#else
|
|
return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
|
|
*unwrap(ES), [] { return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true); }));
|
|
+#endif
|
|
}
|
|
#endif
|