[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-707-g6a6cc54bd

git at osgeo.org git at osgeo.org
Sat Apr 9 16:46:28 PDT 2022


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  6a6cc54bdf1315da8e8c8401575c179aa8727daf (commit)
       via  433060082233fb03f576571c9d65cfb6d4d77bb2 (commit)
      from  3dea38a651fa9c4538fd087df271a38af6f151bc (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 6a6cc54bdf1315da8e8c8401575c179aa8727daf
Merge: 3dea38a65 433060082
Author: Regina Obe <lr at pcorp.us>
Date:   Sat Apr 9 19:33:57 2022 -0400

    Merge remote-tracking branch 'konturio/configure-enable-lto-option'
    Require --with-lto config to enable LTO.
    Closes #4574 for PostGIS 3.3.0
    Closes #5121 for PostGIS 3.3.0

diff --cc NEWS
index 8093b473a,8093b473a..607b3e486
--- a/NEWS
+++ b/NEWS
@@@ -20,7 -20,7 +20,7 @@@ PostGIS 3.3.0de
    - GH657, GiST: do not call no-op decompress function (Aliaksandr Kalenik)
    - #4912, GiST: fix crash on STORAGE EXTERNAL for geography (Aliaksandr Kalenik)
    - ST_ConcaveHull GEOS 3.11+ native implementation (Paul Ramsey, Martin Davis)
--  - GH678, Enable Link-Time Optimizations by default if supported (Sergei Shoulbakov)
++  - #4574, GH678, #5121 Enable Link-Time Optimizations using --with-lto config (Sergei Shoulbakov)
    - GH676, faster ST_Clip (Aliaksandr Kalenik)
  
   * New features *

commit 433060082233fb03f576571c9d65cfb6d4d77bb2
Author: sergei sh <sshoulbakov at kontur.io>
Date:   Fri Apr 8 12:22:45 2022 +0300

    configure option --enable-lto

diff --git a/configure.ac b/configure.ac
index fefccfc0e..de4f73d78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1166,6 +1166,18 @@ dnl
 AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging code and flags]),
 	[ENABLE_DEBUG=1], [ENABLE_DEBUG=0])
 
+dnl Allow the developer to turn on link time optimization is supported by compiler
+dnl with --enable-lto (for non-debug build)
+AC_ARG_ENABLE(
+    [lto],
+    AS_HELP_STRING([--enable-lto], [enable link time optimization if supported by compiler (for non-debug build)]),
+    [case "${enableval}" in
+        yes) ENABLE_LTO=1 ;;
+        no)  ENABLE_LTO=0 ;;
+        *) AC_MSG_ERROR([bad value "${enableval}" for --enable-lto]) ;;
+    esac],
+    [ENABLE_LTO=0])
+
 dnl Add -Wall to CFLAGS
 _LT_COMPILER_OPTION([if $compiler supports -Wall], [_cv_wall], [-Wall], [], [CFLAGS="$CFLAGS -Wall"], [])
 
@@ -1176,10 +1188,10 @@ else
     AC_DEFINE([PARANOIA_LEVEL], [0], [Disable use of memory checks])
     CPPFLAGS="-DNDEBUG $CPPFLAGS"
 
-		if test "$MINGWBUILD" = "0"; then
-    	AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -flto], [_cv_flto], [-flto], [], [CFLAGS="$CFLAGS -flto"], [])
-    	AC_LIBTOOL_LINKER_OPTION([if $compiler supports -flto], [_cv_flto], [[-flto]], [LDFLAGS="$LDFLAGS -flto"])
-		fi
+    if test $ENABLE_LTO -eq 1; then
+        AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -flto], [_cv_flto], [-flto], [], [CFLAGS="$CFLAGS -flto"], [])
+        AC_LIBTOOL_LINKER_OPTION([if $compiler supports -flto], [_cv_flto], [[-flto]], [LDFLAGS="$LDFLAGS -flto"])
+    fi
 fi
 
 AC_DEFINE([POSTGIS_DEBUG_LEVEL], [0], [Define debug level. Default 0])

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

Summary of changes:
 NEWS         |  2 +-
 configure.ac | 20 ++++++++++++++++----
 2 files changed, 17 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list