diff --git a/0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch b/0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch index 1d11412..5e51268 100644 --- a/0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch +++ b/0001-jit-Workaround-potential-datalayout-mismatch-on-s390.patch @@ -12,15 +12,12 @@ causes the JIT to fail at runtime. src/backend/jit/llvm/llvmjit.c | 46 ++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) -diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c -index 98a27f08bf..05b6438ba8 100644 ---- a/src/backend/jit/llvm/llvmjit.c -+++ b/src/backend/jit/llvm/llvmjit.c -@@ -776,6 +776,35 @@ llvm_compile_module(LLVMJitContext *context) - errhidecontext(true))); +--- src/backend/jit/llvm/llvmjit.c.orig ++++ src/backend/jit/llvm/llvmjit.c +@@ -736,6 +736,35 @@ llvm_compile_module(LLVMJitContext *cont } -+/* + /* + * For the systemz target, LLVM uses a different datalayout for z13 and newer + * CPUs than it does for older CPUs. This can cause a mismatch in datalayouts + * in the case where the llvm_types_module is compiled with a pre-z13 CPU @@ -49,10 +46,11 @@ index 98a27f08bf..05b6438ba8 100644 + return ret; +} + - /* ++/* * Per session initialization. */ -@@ -785,6 +814,7 @@ llvm_session_initialize(void) + static void +@@ -744,6 +773,7 @@ llvm_session_initialize(void) MemoryContext oldcontext; char *error = NULL; char *cpu = NULL; @@ -60,7 +58,7 @@ index 98a27f08bf..05b6438ba8 100644 char *features = NULL; LLVMTargetMachineRef opt0_tm; LLVMTargetMachineRef opt3_tm; -@@ -816,10 +846,17 @@ llvm_session_initialize(void) +@@ -775,10 +805,17 @@ llvm_session_initialize(void) * features not all CPUs have (weird, huh). */ cpu = LLVMGetHostCPUName(); @@ -79,7 +77,7 @@ index 98a27f08bf..05b6438ba8 100644 opt0_tm = LLVMCreateTargetMachine(llvm_targetref, llvm_triple, cpu, features, LLVMCodeGenLevelNone, -@@ -833,8 +870,13 @@ llvm_session_initialize(void) +@@ -792,8 +829,13 @@ llvm_session_initialize(void) LLVMDisposeMessage(cpu); cpu = NULL; @@ -94,6 +92,3 @@ index 98a27f08bf..05b6438ba8 100644 /* force symbols in main binary to be loaded */ LLVMLoadLibraryPermanently(NULL); --- -2.27.0 - diff --git a/postgresql13.spec b/postgresql13.spec index f033f9f..99cde3c 100644 --- a/postgresql13.spec +++ b/postgresql13.spec @@ -457,7 +457,7 @@ touch -r configure tmp %patch9 %if %{with llvm} %patch10 -%patch11 -p1 +%patch11 %endif touch -r tmp configure rm tmp