[packages/postgresql/POSTGRESQL_11] fix build with llvm 10; rel 5

atler atler at pld-linux.org
Mon Apr 13 12:44:11 CEST 2020


commit ed68915afc9feb69a70669849aee89ab4ccae3ad
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Apr 13 12:35:39 2020 +0200

    fix build with llvm 10; rel 5

 llvm10.patch    | 34 ++++++++++++++++++++++++++++++++++
 postgresql.spec |  4 +++-
 2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/postgresql.spec b/postgresql.spec
index aaa91fb..89925d6 100644
--- a/postgresql.spec
+++ b/postgresql.spec
@@ -36,7 +36,7 @@ Summary(uk.UTF-8):	PostgreSQL - система керування базами 
 Summary(zh_CN.UTF-8):	PostgreSQL 客户端程序和库文件
 Name:		postgresql
 Version:	%{mver}.5
-Release:	4
+Release:	5
 License:	BSD
 Group:		Applications/Databases
 Source0:	http://ftp.postgresql.org/pub/source/v%{version}/%{name}-%{version}.tar.bz2
@@ -55,6 +55,7 @@ Patch2:		%{name}-ecpg-includedir.patch
 Patch4:		%{name}-disable_horology_test.patch
 Patch5:		%{name}-heimdal.patch
 Patch6:		%{name}-link.patch
+Patch7:		llvm10.patch
 URL:		http://www.postgresql.org/
 BuildRequires:	autoconf >= 2.69
 BuildRequires:	automake
@@ -791,6 +792,7 @@ Różne moduły dołączone do PostgreSQL-a.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 # force rebuild of bison/flex files
 find src -name \*.l -o -name \*.y | xargs touch
diff --git a/llvm10.patch b/llvm10.patch
new file mode 100644
index 0000000..f74c57e
--- /dev/null
+++ b/llvm10.patch
@@ -0,0 +1,34 @@
+From f493d98c167321e5d5c17dd7d795721045a81c97 Mon Sep 17 00:00:00 2001
+From: Thomas Munro <tmunro at postgresql.org>
+Date: Sun, 25 Aug 2019 13:54:48 +1200
+Subject: [PATCH] Don't rely on llvm::make_unique.
+
+Bleeding-edge LLVM has stopped supplying replacements for various
+C++14 library features, for people on older C++ versions.  Since we're
+not ready to require C++14 yet, just use plain old new instead of
+make_unique.  As revealed by buildfarm animal seawasp.
+
+Back-patch to 11.
+
+Reviewed-by: Andres Freund
+Discussion: https://postgr.es/m/CA%2BhUKGJWG7unNqmkxg7nC5o3o-0p2XP6co4r%3D9epqYMm8UY4Mw%40mail.gmail.com
+---
+ src/backend/jit/llvm/llvmjit_inline.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp
+index 0513998b02..688edfe525 100644
+--- a/src/backend/jit/llvm/llvmjit_inline.cpp
++++ b/src/backend/jit/llvm/llvmjit_inline.cpp
+@@ -174,7 +174,7 @@ llvm_inline(LLVMModuleRef M)
+ static std::unique_ptr<ImportMapTy>
+ llvm_build_inline_plan(llvm::Module *mod)
+ {
+-	std::unique_ptr<ImportMapTy> globalsToInline = llvm::make_unique<ImportMapTy>();
++	std::unique_ptr<ImportMapTy> globalsToInline(new ImportMapTy());
+ 	FunctionInlineStates functionStates;
+ 	InlineWorkList worklist;
+ 
+-- 
+2.20.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/postgresql.git/commitdiff/ed68915afc9feb69a70669849aee89ab4ccae3ad



More information about the pld-cvs-commit mailing list