[SCM] PostGIS branch master updated. 3.6.0rc2-384-gda7611d73

git at osgeo.org git at osgeo.org
Tue Mar 10 15:59:28 PDT 2026


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  da7611d733bd175a55ca9ce02298650bcb1f8123 (commit)
      from  bd6ef65e8d418d17064225b182347478ebe84b11 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit da7611d733bd175a55ca9ce02298650bcb1f8123
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Wed Mar 11 02:56:50 2026 +0400

    Optimize PostGIS module self-calls under LTO
    
    Detect -fno-semantic-interposition when the compiler supports it and pass it into PostgreSQL extension module builds so LTO can replace same-DSO PLT calls with direct internal calls. Add a NEWS note with the local pgbench ST_Collect benchmark result.

diff --git a/NEWS b/NEWS
index 6d6847db0..bf6108365 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,12 @@ This version requires GEOS 3.10 or higher
 
 * Bug Fixes *
 
+ - Build PostgreSQL extension modules with `-fno-semantic-interposition` when
+          available so LTO can optimize same-DSO calls to exported PostGIS
+          entry points directly instead of routing through the module PLT; in
+          a local PostgreSQL 18 `pgbench` microbenchmark over 100k four-point
+          groups this reduced `ST_Collect` aggregate latency by about 4%
+          (Darafei Praliaskouski)
  - #5973, Install PostGIS utilities under `pg_config --bindir` by default
           and document `pg_config`-derived install paths more accurately
           (Darafei Praliaskouski)
diff --git a/configure.ac b/configure.ac
index ce0e97a11..9fad2de51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,15 @@ dnl
 PICFLAGS="$lt_prog_compiler_pic"
 AC_SUBST([PICFLAGS])
 
+dnl
+dnl PostgreSQL extension modules can call exported PostGIS entry points across
+dnl translation units. Disable semantic interposition when supported so the
+dnl compiler can optimize those same-DSO calls directly.
+dnl
+MODULE_CFLAGS=""
+_LT_COMPILER_OPTION([if $compiler supports -fno-semantic-interposition], [_cv_nosemanticinterposition], [-fno-semantic-interposition], [], [MODULE_CFLAGS="$MODULE_CFLAGS -fno-semantic-interposition"], [])
+AC_SUBST([MODULE_CFLAGS])
+
 _LT_COMPILER_OPTION([if $compiler supports -fno-math-errno], [_cv_nomatherrno], [-fno-math-errno], [], [CFLAGS="$CFLAGS -fno-math-errno"], [])
 _LT_COMPILER_OPTION([if $compiler supports -fno-signed-zeros], [_cv_nosignedzeros], [-fno-signed-zeros], [], [CFLAGS="$CFLAGS -fno-signed-zeros"], [])
 _LT_COMPILER_OPTION([if $compiler supports -std=gnu11], [_cv_std], -std=gnu11, [], [CFLAGS="-std=gnu11 $CFLAGS"], [])
diff --git a/extensions/address_standardizer/Makefile.in b/extensions/address_standardizer/Makefile.in
index f4929b010..78158c87b 100644
--- a/extensions/address_standardizer/Makefile.in
+++ b/extensions/address_standardizer/Makefile.in
@@ -53,7 +53,7 @@ sql/$(EXTENSION)_data_us--$(EXTVERSION)next--$(EXTVERSION).sql sql/$(EXTENSION)_
 sql/test-init-extensions.sql sql/test-parseaddress.sql sql/test-standardize_address_1.sql sql/test-standardize_address_2.sql sql/test-debug_standardize_address.sql
 
 DOCS = README.address_standardizer
-PG_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -DPCRE_VERSION=@PCRE_VERSION@
+PG_CPPFLAGS = @CFLAGS@ @MODULE_CFLAGS@ @CPPFLAGS@ -DPCRE_VERSION=@PCRE_VERSION@
 
 SHLIB_LINK = @SHLIB_LINK@ @PCRE_LDFLAGS@
 EXTRA_CLEAN = sql/ usps-st-city-name.txt mk-st-regexp mk-city-regex test_main
diff --git a/postgis/Makefile.in b/postgis/Makefile.in
index 03955ba39..e433d51f6 100644
--- a/postgis/Makefile.in
+++ b/postgis/Makefile.in
@@ -145,7 +145,7 @@ OBJS=$(PG_OBJS)
 # to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an
 # older version of PostGIS, rather than with the static liblwgeom.a
 # supplied with newer versions of PostGIS
-PG_CPPFLAGS += -I at top_srcdir@/liblwgeom -I at top_builddir@/liblwgeom @CFLAGS@ -I at top_srcdir@/libpgcommon $(FLATGEOBUF_INCLUDE) $(WAYGU_INCLUDE) $(UTHASH_INCLUDE) @CPPFLAGS@ @PICFLAGS@
+PG_CPPFLAGS += -I at top_srcdir@/liblwgeom -I at top_builddir@/liblwgeom @CFLAGS@ @MODULE_CFLAGS@ -I at top_srcdir@/libpgcommon $(FLATGEOBUF_INCLUDE) $(WAYGU_INCLUDE) $(UTHASH_INCLUDE) @CPPFLAGS@ @PICFLAGS@
 SHLIB_LINK_F = $(WAYGU_LIB) $(FLATGEOBUF_LIB) ../libpgcommon/libpgcommon.a ../liblwgeom/.libs/liblwgeom.a @SHLIB_LINK@
 
 # Extra files to remove during 'make clean'
diff --git a/raster/rt_pg/Makefile.in b/raster/rt_pg/Makefile.in
index 7b0627fe9..4cac36116 100644
--- a/raster/rt_pg/Makefile.in
+++ b/raster/rt_pg/Makefile.in
@@ -79,6 +79,7 @@ PG_CPPFLAGS += \
 	$(LIBLWGEOM_CFLAGS) \
 	@CPPFLAGS@ \
 	@CFLAGS@ \
+	@MODULE_CFLAGS@ \
 	$(LIBGDAL_CFLAGS) \
 	$(LIBPGCOMMON_CFLAGS) \
 	$(LIBPROJ_CFLAGS) \
diff --git a/sfcgal/Makefile.in b/sfcgal/Makefile.in
index 61ebe0842..98bec98ad 100644
--- a/sfcgal/Makefile.in
+++ b/sfcgal/Makefile.in
@@ -55,7 +55,7 @@ OBJS = lwgeom_sfcgal.o postgis_sfcgal_legacy.o
 # to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an
 # older version of PostGIS, rather than with the static liblwgeom.a
 # supplied with newer versions of PostGIS
-PG_CPPFLAGS += -I at top_builddir@/liblwgeom -I at top_srcdir@/liblwgeom -I at top_srcdir@/libpgcommon @CFLAGS@ @CPPFLAGS@ @PICFLAGS@
+PG_CPPFLAGS += -I at top_builddir@/liblwgeom -I at top_srcdir@/liblwgeom -I at top_srcdir@/libpgcommon @CFLAGS@ @MODULE_CFLAGS@ @CPPFLAGS@ @PICFLAGS@
 SHLIB_LINK_F = @top_builddir@/libpgcommon/libpgcommon.a @top_builddir@/liblwgeom/.libs/liblwgeom.a @SHLIB_LINK@
 
 # Add SFCGAL Flags if defined
diff --git a/topology/Makefile.in b/topology/Makefile.in
index 608f5e76a..24f155599 100644
--- a/topology/Makefile.in
+++ b/topology/Makefile.in
@@ -52,7 +52,7 @@ OBJS = postgis_topology.o
 # to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an
 # older version of PostGIS, rather than with the static liblwgeom.a
 # supplied with newer versions of PostGIS
-PG_CPPFLAGS += -I at top_builddir@/liblwgeom -I at top_srcdir@/liblwgeom -I at top_srcdir@/libpgcommon @CFLAGS@ @CPPFLAGS@ @PICFLAGS@
+PG_CPPFLAGS += -I at top_builddir@/liblwgeom -I at top_srcdir@/liblwgeom -I at top_srcdir@/libpgcommon @CFLAGS@ @MODULE_CFLAGS@ @CPPFLAGS@ @PICFLAGS@
 SHLIB_LINK_F = @top_builddir@/libpgcommon/libpgcommon.a @top_builddir@/liblwgeom/.libs/liblwgeom.a @SHLIB_LINK@
 
 # Add SFCGAL Flags if defined

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                        | 6 ++++++
 configure.ac                                | 9 +++++++++
 extensions/address_standardizer/Makefile.in | 2 +-
 postgis/Makefile.in                         | 2 +-
 raster/rt_pg/Makefile.in                    | 1 +
 sfcgal/Makefile.in                          | 2 +-
 topology/Makefile.in                        | 2 +-
 7 files changed, 20 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list