From beccfd1f8d87ae2196815d5a760054312e8e1c38 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 20 Jul 2016 17:29:17 +0200 Subject: 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 Tested-by: Norbert Thiebaud --- solenv/gbuild/platform/com_GCC_class.mk | 1 + solenv/gbuild/platform/com_GCC_defs.mk | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'solenv/gbuild') diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index 8c32795f2db9..4d0378bec617 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 8f26cbf8b81a..10f9a4726176 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 := -- cgit