diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-20 14:42:56 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2020-06-30 14:03:51 +0200 |
commit | 7aa7729babe9d9c0a3268ea6b40c012cba4433ae (patch) | |
tree | 4d5d0999de68534aa5e862a5873e55aaf2b4d6b7 | |
parent | 1e2d5383489cb1d53a1bbfaec777461994c73b64 (diff) |
We do not need a C++ GNU dialect
1cf7ab61a71d4b7295942ff5c855896e60c15081 "use -std=gnu++0x rather than
-std=c++0x" appears to have started this, but the only rationale it gives is
that it keeps things in sync with GCC's default behavior when no -std= is given.
But it apparently works fine to build with a -std=c++... standard dialect.
This allows to get rid of the check introduced with
50cd28e5728b6a64c1e605567540739ea6ef42ca "Ensure configuration that defines
math_errhandling in <cmath>".
(It kept bothering me to say "I observe this-and-this with -std=c++2a" when what
configure.ac made me actually use was -std=gnu++2a. And truthfully saying
"-std=gnu++2a" would have been a distraction, as what is relevant for such an
observation is most likely the "2a" and not the "gnu" part.)
Change-Id: I7c213a702ffb7df6f4c2c4a421008e30e2712a51
Reviewed-on: https://gerrit.libreoffice.org/81176
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit a9f77e87f3e6ca3333bbb16dec5456f3bf2903b8)
-rw-r--r-- | configure.ac | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 5d328a481440..8c251fb31e1a 100644 --- a/configure.ac +++ b/configure.ac @@ -6443,7 +6443,7 @@ CXXFLAGS_CXX11= if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then CXXFLAGS_CXX11='-std:c++17 -Zc:__cplusplus' elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then - my_flags='-std=gnu++2a -std=c++2a -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z' + my_flags='-std=c++2a -std=c++17 -std=c++1z' for flag in $my_flags; do if test "$COM" = MSC; then flag="-Xclang $flag" @@ -6486,7 +6486,6 @@ elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then ]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <algorithm> - #include <cmath> #include <functional> #include <vector> @@ -6506,13 +6505,6 @@ elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then void f(std::vector<int> & v, std::function<bool(int, int)> fn) { std::sort(v.begin(), v.end(), fn); } - - // At least with glibc-headers-2.28-26.fc29.x86_64, when building for Linux x86 32-bit - // (via -m32) and passed-in CXXFLAGS setting -O1 (or higher; overriding -Os as set in - // solenv/gbuild/platform/LINUX_INTEL_GCC.mk), std=gnu* would cause math_errhandling to - // get undef'ed in /usr/include/bits/mathinline.h, while std=c* keeps it defined (as - // needed by sc/source/core/tool/math.cxx): - int g() { return math_errhandling; } ]])],[CXXFLAGS_CXX11=$flag $my_float128hack]) AC_LANG_POP([C++]) CXXFLAGS=$save_CXXFLAGS |