Bug 1261263 - Switch from -std=gnu++0x to -std=gnu++11. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 01 Apr 2016 12:05:12 +0900
changeset 291552 fbddfbf778ec61e0b9289808baa73facb72d96a7
parent 291551 b66c04c0c8d5e9f80eeaea955428b2c2988d4c08
child 291553 c0daa17bdb2f513644005d3b65ced0441264dd2d
push id74615
push usermh@glandium.org
push dateMon, 04 Apr 2016 22:19:06 +0000
treeherdermozilla-inbound@ae2f8bdfec61 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1261263
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
js/src/js-config.in
--- 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
--- a/js/src/js-config.in
+++ b/js/src/js-config.in
@@ -103,14 +103,14 @@ if test "$echo_includedir" = "yes"; then
     echo $includedir
 fi
 
 if test "$echo_libdir" = "yes"; then
     echo $libdir
 fi
 
 if test "$echo_cflags" = "yes"; then
-    echo "-std=gnu++0x -include $includedir/$JS_LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$JS_LIBRARY_NAME $NSPR_CFLAGS"
+    echo "-std=gnu++11 -include $includedir/$JS_LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$JS_LIBRARY_NAME $NSPR_CFLAGS"
 fi
 
 if test "$echo_libs" = "yes"; then
     echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS"
 fi