[Libreoffice-commits] core.git: solenv/gbuild
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 25 14:51:06 UTC 2018
solenv/gbuild/platform/com_GCC_defs.mk | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit f9ba4c2be1c1514553050fea37c48b757a68d4fd
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Nov 25 13:34:10 2018 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Nov 25 15:50:45 2018 +0100
Generally set CCACHE_CPP2 for --enable-werror GCC
This obsoletes <https://gerrit.libreoffice.org/plugins/gitiles/lode/+/
b82e0a9d26ef4c81046c053ff831dccfc84c56be%5E!> "For linux_gcc_release_64, don't
let ccache strip comments" and fixes ccache for all builds using (recent) GCC.
Change-Id: I5fd20b2565f57073c545fe5d3a9639c2c0583a74
Reviewed-on: https://gerrit.libreoffice.org/63979
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 057ef8fd5762..4875759e06e2 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -251,8 +251,14 @@ gb_COMPILER_PLUGINS_SETUP := ICECC_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.do
gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS := \
-Xclang -plugin-arg-loplugin -Xclang --warnings-as-errors
else
-gb_COMPILER_TEST_FLAGS :=
+# Set CCACHE_CPP2 to prevent GCC -Werror=implicit-fallthrough= when ccache strips comments from C
+# code (which still needs /*fallthrough*/-style comments to silence that warning):
+ifeq ($(ENABLE_WERROR),TRUE)
+gb_COMPILER_SETUP := CCACHE_CPP2=1
+else
gb_COMPILER_SETUP :=
+endif
+gb_COMPILER_TEST_FLAGS :=
gb_COMPILER_PLUGINS :=
gb_COMPILER_PLUGINS_SETUP :=
gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS :=
More information about the Libreoffice-commits
mailing list