[Libreoffice-commits] core.git: configure.ac distro-configs/LibreOfficeCoverity.conf
Stephan Bergmann
sbergman at redhat.com
Tue Nov 28 20:55:22 UTC 2017
configure.ac | 12 +++++++++++-
distro-configs/LibreOfficeCoverity.conf | 1 +
2 files changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 0f3b0ec973f06a98c75ef8acfa720a9973e4d2b5
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Nov 28 12:25:32 2017 +0100
Avoid C++17 mode for Coverity Scan
...see mail sub-thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-November/078966.html>
"Re: New Defects reported by Coverity Scan for LibreOffice" about cid#1424266 et
al; lets see if this makes Coverity happy again...
Change-Id: If488b9f61f084f2286b35326917741051ec8d5ce
Reviewed-on: https://gerrit.libreoffice.org/45403
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/configure.ac b/configure.ac
index 3543d5874771..23b1ff84ed5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5983,6 +5983,12 @@ dnl ===================================================================
dnl C++11
dnl ===================================================================
+my_cxx17switches=
+libo_FUZZ_ARG_ENABLE(c++17,
+ AS_HELP_STRING([--disable-c++17],
+ [Do not attempt to run GCC/Clang in C++17 mode (needed for Coverity).])
+)
+
CXXFLAGS_CXX11=
if test "$COM" = MSC; then
AC_MSG_CHECKING([whether $CXX supports C++11])
@@ -5994,7 +6000,11 @@ elif test "$GCC" = "yes"; then
dnl But only use C++17 if the gperf that is being used knows not to emit
dnl "register" in C++ output:
printf 'foo\n' | $GPERF -L C++ > conftest.inc
- for flag in -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z -std=gnu++14 -std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
+ my_flags='-std=gnu++14 -std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x'
+ if test "$enable_c__17" != no; then
+ my_flags="-std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z $my_flags"
+ fi
+ for flag in $my_flags; do
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $flag -Werror"
AC_LANG_PUSH([C++])
diff --git a/distro-configs/LibreOfficeCoverity.conf b/distro-configs/LibreOfficeCoverity.conf
index e387254a6405..9d55f6811732 100644
--- a/distro-configs/LibreOfficeCoverity.conf
+++ b/distro-configs/LibreOfficeCoverity.conf
@@ -1,3 +1,4 @@
+--disable-c++17
--enable-assert-always-abort
--without-help
--enable-gio
More information about the Libreoffice-commits
mailing list