diff options
author | Palle Girgensohn <girgen@FreeBSD.org> | 2020-09-27 20:17:57 +0000 |
---|---|---|
committer | Palle Girgensohn <girgen@FreeBSD.org> | 2020-09-27 20:17:57 +0000 |
commit | c466515eeded9d6b6dc1562c58b648532bff4fa8 (patch) | |
tree | 37881cc889994b3ccfe293f5986069009c92c0cc /databases/postgresql13-server | |
parent | d91ff736d6aa21271c2d2de791f1f534c744fe90 (diff) | |
download | ports-c466515eeded9d6b6dc1562c58b648532bff4fa8.tar.gz ports-c466515eeded9d6b6dc1562c58b648532bff4fa8.zip |
Fix building with LLVM
Fix a plist issue [1].
Make sure the LLVM options are correctly handled. Setting the OPTIONS_DEFAULT
conditionally based on wheather the default compiler is cland doesn't work
properly, it is always set even if you deselect it. Just setting it per default
seems to work better.
Attempt a fix for building on FreeBSD-13.0 where clang is newer than the
default LLVM. First attempt is to use an lower version clang to match what LLVM
has as default. [2]
PR: 244403 [2], 249933 [2], 249875 [1]
Notes
Notes:
svn path=/head/; revision=550339
Diffstat (limited to 'databases/postgresql13-server')
-rw-r--r-- | databases/postgresql13-server/Makefile | 54 | ||||
-rw-r--r-- | databases/postgresql13-server/pkg-plist-server | 21 |
2 files changed, 38 insertions, 37 deletions
diff --git a/databases/postgresql13-server/Makefile b/databases/postgresql13-server/Makefile index 87169a8cc081..32cd3ddbca2c 100644 --- a/databases/postgresql13-server/Makefile +++ b/databases/postgresql13-server/Makefile @@ -5,7 +5,7 @@ PORTNAME?= postgresql DISTVERSION?= 13.0 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and # not their own. Probably best to keep it at ?=0 when reset here too. -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES?= databases MASTER_SITES= PGSQL/source/v${DISTVERSION} PKGNAMESUFFIX?= ${PORTVERSION:R}${COMPONENT} @@ -75,6 +75,8 @@ GROUPS= ${PG_GROUP} SUB_FILES+= 502.pgsql .endif +OPTIONS_SUB= yes + .if defined(CLIENT_ONLY) OPTIONS_DEFINE+=LIBEDIT DOCS LIBEDIT_DESC= Use non-GPL libedit instead of readline @@ -90,11 +92,21 @@ DTRACE_DESC= Build with DTrace probes TZDATA_DESC= Use internal timezone database XML_DESC= Build with XML data type +DTRACE_CONFIGURE_ENABLE=dtrace +DTRACE_LDFLAGS= -lelf +DTRACE_INSTALL_TARGET= install + .if ${DISTVERSION:C/([0-9]*).*/\1/} >= 11 OPTIONS_DEFINE+= LLVM +OPTIONS_DEFAULT+= LLVM LLVM_DESC= Build with support for JIT-compiling expressions -OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${CHOSEN_COMPILER_TYPE}} -OPTIONS_DEFAULT_clang= LLVM +LLVM_CONFIGURE_WITH= llvm +LLVM_BUILD_DEPENDS= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} +LLVM_BUILD_DEPENDS+= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} +LLVM_RUN_DEPENDS+= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} +LLVM_CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} +#OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${CHOSEN_COMPILER_TYPE}} +#OPTIONS_DEFAULT_clang= LLVM .endif .if ${DISTVERSION:C/([0-9]*).*/\1/} < 10 @@ -133,6 +145,8 @@ OPTIONS_DEFINE+= SSL SSL_DESC= Build with OpenSSL support OPTIONS_DEFAULT+= SSL + +GSSAPI_CONFIGURE_WITH= gssapi .endif # !SLAVE_ONLY .if defined(CLIENT_ONLY) @@ -181,16 +195,7 @@ USES+= compiler .if ${DISTVERSION:C/([0-9]*).*/\1/} >= 11 . if defined(SERVER_ONLY) && ${PORT_OPTIONS:MLLVM} -BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} -BUILD_DEPENDS+= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} -RUN_DEPENDS+= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} -CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} -CONFIGURE_ARGS+= --with-llvm -PLIST_SUB+= LLVM="" INSTALL_DIRS+= src/backend/jit/llvm -. else -PLIST_SUB+= LLVM="@comment " -CONFIGURE_ARGS+= --without-llvm . endif .endif @@ -208,14 +213,7 @@ LIB_DEPENDS+= libicudata.so:devel/icu PATCH_DIST_STRIP=-p1 -. if ${PORT_OPTIONS:MDTRACE} -CONFIGURE_ARGS+=--enable-dtrace -LDFLAGS+=-lelf -INSTALL_TARGET= install -. endif - .if ${PORT_OPTIONS:MGSSAPI} -CONFIGURE_ARGS+=--with-gssapi .if empty(PORT_OPTIONS:MMIT_KRB5) && empty(PORT_OPTIONS:MHEIMDAL_KRB5) # Kerberos libraries will pull the proper GSSAPI library # via linker dependencies, but otherwise we must specify @@ -223,11 +221,7 @@ CONFIGURE_ARGS+=--with-gssapi # so configure's -lgssapi_krb5 won't go. LDFLAGS+= -lgssapi LDFLAGS_SL+= -lgssapi -PLIST_SUB+= GSSAPI="" .endif -.else -CONFIGURE_ARGS+=--without-gssapi -PLIST_SUB+= GSSAPI="@comment " .endif . if ${PORT_OPTIONS:MMIT_KRB5} @@ -246,17 +240,18 @@ LIB_DEPENDS+= libkrb5.so.3:security/krb5 CONFIGURE_ARGS+=--with-krb5 . endif -. if ${PORT_OPTIONS:MSSL} -PLIST_SUB+= SSL="" -. else -PLIST_SUB+= SSL="@comment " -. endif - .endif # !SLAVE_ONLY # For testing files in FILESDIR .include <bsd.port.pre.mk> +# Fix problems building on FreeBSD 13 by keeping clang and llvm versions in sync +.if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD && ${OSVERSION} >= 1300109 +BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} +CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} +CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT} +.endif + .if defined(SERVER_ONLY) pre-build: @${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL @@ -276,7 +271,6 @@ PKGMESSAGE= ${WRKSRC}/pkg-message${COMPONENT} . endif . if exists(${FILESDIR}/pkg-install${COMPONENT}.in) SUB_FILES+= pkg-install${COMPONENT} -PLIST_SUB+= PG_USER=${PG_USER} . endif post-patch: diff --git a/databases/postgresql13-server/pkg-plist-server b/databases/postgresql13-server/pkg-plist-server index 149535c20198..bd47200b5908 100644 --- a/databases/postgresql13-server/pkg-plist-server +++ b/databases/postgresql13-server/pkg-plist-server @@ -55,7 +55,9 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/access/brin/brin_tuple.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/brin/brin_validate.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/brin/brin_xlog.bc +%%LLVM%%lib/postgresql/bitcode/postgres/access/common/attmap.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/bufmask.bc +%%LLVM%%lib/postgresql/bitcode/postgres/access/common/detoast.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/heaptuple.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/indextuple.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/printsimple.bc @@ -64,6 +66,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/access/common/reloptions.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/scankey.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/session.bc +%%LLVM%%lib/postgresql/bitcode/postgres/access/common/toast_internals.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/tupconvert.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/common/tupdesc.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/gin/ginarrayproc.bc @@ -105,11 +108,11 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/heapam.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/heapam_handler.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/heapam_visibility.bc +%%LLVM%%lib/postgresql/bitcode/postgres/access/heap/heaptoast.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/hio.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/pruneheap.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/rewriteheap.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/syncscan.bc -%%LLVM%%lib/postgresql/bitcode/postgres/access/heap/tuptoaster.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/vacuumlazy.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/heap/visibilitymap.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/index/amapi.bc @@ -117,6 +120,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/access/index/genam.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/index/indexam.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/nbtree/nbtcompare.bc +%%LLVM%%lib/postgresql/bitcode/postgres/access/nbtree/nbtdedup.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/nbtree/nbtinsert.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/nbtree/nbtpage.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/nbtree/nbtree.bc @@ -161,6 +165,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/access/table/table.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/table/tableam.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/table/tableamapi.bc +%%LLVM%%lib/postgresql/bitcode/postgres/access/table/toast_helper.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/tablesample/bernoulli.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/tablesample/system.bc %%LLVM%%lib/postgresql/bitcode/postgres/access/tablesample/tablesample.bc @@ -197,6 +202,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/catalog/objectaddress.bc %%LLVM%%lib/postgresql/bitcode/postgres/catalog/partition.bc %%LLVM%%lib/postgresql/bitcode/postgres/catalog/pg_aggregate.bc +%%LLVM%%lib/postgresql/bitcode/postgres/catalog/pg_cast.bc %%LLVM%%lib/postgresql/bitcode/postgres/catalog/pg_collation.bc %%LLVM%%lib/postgresql/bitcode/postgres/catalog/pg_constraint.bc %%LLVM%%lib/postgresql/bitcode/postgres/catalog/pg_conversion.bc @@ -293,6 +299,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/executor/nodeGroup.bc %%LLVM%%lib/postgresql/bitcode/postgres/executor/nodeHash.bc %%LLVM%%lib/postgresql/bitcode/postgres/executor/nodeHashjoin.bc +%%LLVM%%lib/postgresql/bitcode/postgres/executor/nodeIncrementalSort.bc %%LLVM%%lib/postgresql/bitcode/postgres/executor/nodeIndexonlyscan.bc %%LLVM%%lib/postgresql/bitcode/postgres/executor/nodeIndexscan.bc %%LLVM%%lib/postgresql/bitcode/postgres/executor/nodeLimit.bc @@ -333,7 +340,6 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/lib/knapsack.bc %%LLVM%%lib/postgresql/bitcode/postgres/lib/pairingheap.bc %%LLVM%%lib/postgresql/bitcode/postgres/lib/rbtree.bc -%%LLVM%%lib/postgresql/bitcode/postgres/lib/stringinfo.bc %%LLVM%%lib/postgresql/bitcode/postgres/libpq/auth-scram.bc %%LLVM%%lib/postgresql/bitcode/postgres/libpq/auth.bc %%LLVM%%lib/postgresql/bitcode/postgres/libpq/be-fsstubs.bc @@ -446,6 +452,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/postmaster/bgwriter.bc %%LLVM%%lib/postgresql/bitcode/postgres/postmaster/checkpointer.bc %%LLVM%%lib/postgresql/bitcode/postgres/postmaster/fork_process.bc +%%LLVM%%lib/postgresql/bitcode/postgres/postmaster/interrupt.bc %%LLVM%%lib/postgresql/bitcode/postgres/postmaster/pgarch.bc %%LLVM%%lib/postgresql/bitcode/postgres/postmaster/pgstat.bc %%LLVM%%lib/postgresql/bitcode/postgres/postmaster/postmaster.bc @@ -458,6 +465,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/regex/regexport.bc %%LLVM%%lib/postgresql/bitcode/postgres/regex/regfree.bc %%LLVM%%lib/postgresql/bitcode/postgres/regex/regprefix.bc +%%LLVM%%lib/postgresql/bitcode/postgres/replication/backup_manifest.bc %%LLVM%%lib/postgresql/bitcode/postgres/replication/basebackup.bc %%LLVM%%lib/postgresql/bitcode/postgres/replication/logical/decode.bc %%LLVM%%lib/postgresql/bitcode/postgres/replication/logical/launcher.bc @@ -536,9 +544,10 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/storage/smgr/md.bc %%LLVM%%lib/postgresql/bitcode/postgres/storage/smgr/smgr.bc %%LLVM%%lib/postgresql/bitcode/postgres/storage/sync/sync.bc -%%LLVM%%lib/postgresql/bitcode/postgres/tcop/postgres.bc +%%LLVM%%lib/postgresql/bitcode/postgres/tcop/cmdtag.bc %%LLVM%%lib/postgresql/bitcode/postgres/tcop/dest.bc %%LLVM%%lib/postgresql/bitcode/postgres/tcop/fastpath.bc +%%LLVM%%lib/postgresql/bitcode/postgres/tcop/postgres.bc %%LLVM%%lib/postgresql/bitcode/postgres/tcop/pquery.bc %%LLVM%%lib/postgresql/bitcode/postgres/tcop/utility.bc %%LLVM%%lib/postgresql/bitcode/postgres/tsearch/dict.bc @@ -647,7 +656,6 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/tsvector.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/tsvector_op.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/tsvector_parser.bc -%%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/txid.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/uuid.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/varbit.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/varchar.bc @@ -655,6 +663,7 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/version.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/windowfuncs.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/xid.bc +%%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/xid8funcs.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/adt/xml.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/cache/attoptcache.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/cache/catcache.bc @@ -677,15 +686,13 @@ lib/postgresql/utf8_and_win.so %%LLVM%%lib/postgresql/bitcode/postgres/utils/fmgr/funcapi.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/fmgrtab.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/hash/dynahash.bc -%%LLVM%%lib/postgresql/bitcode/postgres/utils/hash/hashfn.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/hash/pg_crc.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/init/globals.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/init/miscinit.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/init/postinit.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/mb/conv.bc -%%LLVM%%lib/postgresql/bitcode/postgres/utils/mb/encnames.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/mb/mbutils.bc -%%LLVM%%lib/postgresql/bitcode/postgres/utils/mb/wchar.bc +%%LLVM%%lib/postgresql/bitcode/postgres/utils/mb/stringinfo_mb.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/mb/wstrcmp.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/mb/wstrncmp.bc %%LLVM%%lib/postgresql/bitcode/postgres/utils/misc/guc.bc |