Bug 1261263 - Switch from -std=gnu++0x to -std=gnu++11. r?froydnj
All the GCC and clang versions we support support the latter, so let's
use it.
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -190,18 +190,18 @@ PATH=$_SAVE_PATH
])
AC_DEFUN([MOZ_CXX11],
[
dnl Updates to the test below should be duplicated further below for the
dnl cross-compiling case.
AC_LANG_CPLUSPLUS
if test "$GNU_CXX"; then
- CXXFLAGS="$CXXFLAGS -std=gnu++0x"
- _ADDED_CXXFLAGS="-std=gnu++0x"
+ CXXFLAGS="$CXXFLAGS -std=gnu++11"
+ _ADDED_CXXFLAGS="-std=gnu++11"
if test -n "$CLANG_CC"; then
dnl We'd normally just check for the version from CC_VERSION (fed
dnl from __clang_major__ and __clang_minor__), but the clang that
dnl comes with Xcode has a completely different version scheme
dnl despite exposing the version with the same defines.
dnl So instead of a version check, do a feature check. Normally,
dnl we'd use __has_feature, but there are unfortunately no C++11
@@ -274,17 +274,17 @@ EOF
changequote([,])
if test "$HOST_GCC_MAJOR_VERSION" -eq 4 -a "$HOST_GCC_MINOR_VERSION" -lt 8 ||
test "$HOST_GCC_MAJOR_VERSION" -lt 4; then
AC_MSG_ERROR([Only GCC 4.8 or newer supported for host compiler])
fi
fi
- HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++0x"
+ HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++11"
_SAVE_CXXFLAGS="$CXXFLAGS"
_SAVE_CPPFLAGS="$CPPFLAGS"
_SAVE_CXX="$CXX"
CXXFLAGS="$HOST_CXXFLAGS"
CPPFLAGS="$HOST_CPPFLAGS"
CXX="$HOST_CXX"
if test "$host_compiler" = CLANG; then