[Libreoffice-commits] core.git: configure.ac solenv/gbuild
Michael Stahl
mstahl at redhat.com
Thu Jul 21 23:29:50 UTC 2016
configure.ac | 12 ------------
solenv/gbuild/platform/com_GCC_class.mk | 1 +
solenv/gbuild/platform/com_GCC_defs.mk | 6 ++++--
3 files changed, 5 insertions(+), 14 deletions(-)
New commits:
commit beccfd1f8d87ae2196815d5a760054312e8e1c38
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jul 20 17:29:17 2016 +0200
gbuild: always set CCACHE_CPP2=1 when COM_IS_CLANG
There are not only spurious warnings from loplugin, but also from plain
clang, at least with the Fedora 24 version. So let's just try to always
set CCACHE_CPP2=1.
This should make the configure check for that obsolete. The check didn't
do anything on Fedora anyway because it sets up ccache by putting
wrappers like /usr/lib64/ccache/clang on PATH.
Change-Id: Ieb17be4a1b1fd0f7aedb16b18cb49015917a26d3
Reviewed-on: https://gerrit.libreoffice.org/27345
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/configure.ac b/configure.ac
index d93de79..cd7c9c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3822,18 +3822,6 @@ if test "$COM_IS_CLANG" = TRUE; then
fi
AC_SUBST(COM_IS_CLANG)
-if test "$CCACHE" != "" -a "$COM_IS_CLANG" = TRUE; then
- if test -z "$CCACHE_CPP2"; then
- if test "$enable_ccache" = "" ; then
- AC_MSG_WARN([Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings/errors.])
- add_warning "Using ccache with Clang without CCACHE_CPP2 set causes spurious warnings/errors. Disabling it."
- CCACHE=
- else
- AC_MSG_ERROR([Using --enable-ccache with Clang without CCACHE_CPP2 set causes spurious warnings/errors.])
- fi
- fi
-fi
-
#
# prefix C with ccache if needed
#
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 8c32795..4d0378b 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -46,6 +46,7 @@ endef
define gb_CObject__command_pattern
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \
+ $(gb_COMPILER_SETUP) \
$(if $(5),$(gb_COMPILER_PLUGINS_SETUP)) \
$(if $(filter %.c %.m,$(3)), $(gb_CC), $(gb_CXX)) \
$(DEFS) \
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 8f26cbf..10f9a47 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -218,11 +218,13 @@ ifneq ($(UPDATE_FILES),)
gb_COMPILER_PLUGINS += -Xclang -plugin-arg-loplugin -Xclang --scope=$(UPDATE_FILES)
endif
endif
-# extra EF variable to make the command line shorter (just like is done with $(SRCDIR) etc.)
-gb_COMPILER_PLUGINS_SETUP := EF=$(SRCDIR)/include/sal/log-areas.dox && ICECC_EXTRAFILES=$$EF CCACHE_EXTRAFILES=$$EF CCACHE_CPP2=1
+# set CCACHE_CPP2=1 to prevent clang generating spurious warnings
+gb_COMPILER_SETUP := CCACHE_CPP2=1
+gb_COMPILER_PLUGINS_SETUP := ICECC_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox CCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox
gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS := \
-Xclang -plugin-arg-loplugin -Xclang --warnings-as-errors
else
+gb_COMPILER_SETUP :=
gb_COMPILER_PLUGINS :=
gb_COMPILER_PLUGINS_SETUP :=
gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS :=
More information about the Libreoffice-commits
mailing list