diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-11-25 13:34:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-11-25 15:50:45 +0100 |
commit | f9ba4c2be1c1514553050fea37c48b757a68d4fd (patch) | |
tree | dac46c59d6c0807ec462bf74a95658ec5dffd1b3 /solenv | |
parent | f4955d7b1879034513322f98eca027f3ee4bbc17 (diff) |
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@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 8 |
1 files changed, 7 insertions, 1 deletions
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 := |