[Libreoffice-commits] core.git: configure.ac

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Wed May 22 12:21:46 UTC 2019


 configure.ac |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit fd59a10734b1f7cc58579898be83644f5a747457
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue May 21 22:41:13 2019 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed May 22 14:20:19 2019 +0200

    current ccache does not correctly handle PCH in depend mode
    
    It doesn't correctly make a dependency on the .gch or anything
    the .gch is made from, so there would be stale cache hits even
    if anything included from the .gch changed. Disable CCACHE_DEPEND.
    https://github.com/ccache/ccache/pull/427
    
    Change-Id: I6929ff6ec1f1e50498033cdf95b56c94522166eb
    Reviewed-on: https://gerrit.libreoffice.org/72704
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/configure.ac b/configure.ac
index 89bb6abaa324..fbd3a4237f3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5088,6 +5088,23 @@ else
     AC_MSG_ERROR([Unknown value for --enable-pch])
 fi
 AC_SUBST(ENABLE_PCH)
+# ccache 3.7.1 and older do not properly detect/handle -include .gch in CCACHE_DEPEND mode
+if test -n "$ENABLE_PCH" -a -n "$CCACHE_DEPEND_MODE" -a "$GCC" = "yes" -a "$COM_IS_CLANG" != "TRUE"; then
+    AC_PATH_PROG([CCACHE_BIN],[ccache],[not found])
+    if test "$CCACHE_BIN" != "not found"; then
+        AC_MSG_CHECKING([ccache version])
+        CCACHE_VERSION=`"$CCACHE_BIN" -V | "$AWK" '/^ccache version/{print $3}'`
+        CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+        AC_MSG_RESULT([$CCACHE_VERSION])
+        AC_MSG_CHECKING([whether ccache depend mode works properly with GCC PCH])
+        if test "$CCACHE_NUMVER" -gt "030701"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_RESULT([no (not newer than 3.7.1)])
+            CCACHE_DEPEND_MODE=
+        fi
+    fi
+fi
 
 TAB=`printf '\t'`
 


More information about the Libreoffice-commits mailing list