summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-05-21 22:41:13 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-05-22 14:20:19 +0200
commitfd59a10734b1f7cc58579898be83644f5a747457 (patch)
tree32353f8b427639c3edb0706ba73eaf4e5aa5cfab /configure.ac
parentcaaffb213a0da5541ff9172e3f1600ce6447689c (diff)
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@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
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'`