1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-07 11:49:40 +00:00

databases/postgresql14-server: Avoid using llvm14

When the base system compiler is clang 14, the postgresql ports attempt
to build against the devel/llvm14 port. This will fail with several
compile errors as there are a few incompatible changes in the LLVM 14 C
and C++ APIs. Until upstream postgresql adapts to these changes, limit
the PG_LLVM_VERSION to a maximum of 13.

PR:		 261976
Approved by:	maintainer timeout (2 weeks)
MFH:		2022Q1
This commit is contained in:
Dimitry Andric 2022-03-16 19:28:57 +01:00
parent 610ab176d1
commit dbafe427a4

View File

@ -266,15 +266,26 @@ LLVM_PORT_SUFFIX= ${COMPILER_VERSION:C/.$//}
.if ${COMPILER_VERSION} > ${LLVM_DEFAULT_VERSION}
# LLVM versions in ports are, in order, 70, 80 90, 10, 11, 12... where 10 > 90. [sic]
. if ${LLVM_PORT_SUFFIX} < 70
# PR 261976 postgresql fails to build with LLVM 14
. if ${LLVM_PORT_SUFFIX} > 13
PG_LLVM_VERSION=13
PG_COMPILER_VERSION=13
. else
PG_LLVM_VERSION=${LLVM_PORT_SUFFIX}
PG_COMPILER_VERSION=${LLVM_PORT_SUFFIX}
. endif
. else
PG_LLVM_VERSION=11
PG_COMPILER_VERSION=11
. endif
.else
. if ${LLVM_PORT_SUFFIX} > 13
PG_LLVM_VERSION=13
PG_COMPILER_VERSION=13
. else
PG_LLVM_VERSION=${LLVM_DEFAULT}
PG_COMPILER_VERSION=${LLVM_PORT_SUFFIX}
. endif
.endif
.if ${DISTVERSION:C/([0-9]*).*/\1/} >= 11