Bug 1261263 - Switch from -std=gnu++0x to -std=gnu++11. r?froydnj draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 01 Apr 2016 12:05:12 +0900
changeset 346474 c05bcf4dc6366ef12763d0bc912f086d376005f4
parent 346473 ae0709a4832ca8e303dacb926da0c113363e2337
child 346475 a17b6b8ffb3d0e72f152ea7ae58e6acaef7ea3e5
push id14391
push userbmo:mh+mozilla@glandium.org
push dateFri, 01 Apr 2016 06:06:10 +0000
reviewersfroydnj
bugs1261263
milestone48.0a1
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.
build/autoconf/toolchain.m4
--- 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