Bug 895915 - Re-sync build/autoconf and js/src/build/autoconf
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 30 Jul 2013 09:00:38 +0900
changeset 140496 37b47ffd5a409af98b6ef492c57298824c727918
parent 140495 1f59dc8474a5dd5fe4a48efdb35111d92d4bbe83
child 140497 57bf6621279b17e24aa3a30fab1969f9695363b1
push id1970
push userryanvm@gmail.com
push dateTue, 30 Jul 2013 17:12:32 +0000
treeherderfx-team@72240998c094 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs895915
milestone25.0a1
Bug 895915 - Re-sync build/autoconf and js/src/build/autoconf
js/src/build/autoconf/toolchain.m4
--- a/js/src/build/autoconf/toolchain.m4
+++ b/js/src/build/autoconf/toolchain.m4
@@ -140,16 +140,18 @@ dnl dnl have erroneously been set to "no
 dnl dnl able to run ppc code in a translated environment, making a cross
 dnl dnl compiler appear native.  So we override that here.
 cross_compiling=yes
 ])
 
 AC_DEFUN([MOZ_CXX11],
 [
 dnl Check whether gcc's c++0x mode works
+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"
 
     AC_CACHE_CHECK(for gcc c++0x headers bug without rtti,
         ac_cv_cxx0x_headers_bug,
         [AC_TRY_COMPILE([#include <memory>], [],
                         ac_cv_cxx0x_headers_bug="no",
@@ -179,19 +181,19 @@ CLANG
 GCC
 #endif
 EOF
     host_compiler=`$HOST_CXX -E conftest.C | egrep '(CLANG|GCC)'`
     rm conftest.C
     if test -n "$host_compiler"; then
         HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++0x"
 
-	_SAVE_CXXFLAGS="$CXXFLAGS"
-	_SAVE_CPPFLAGS="$CPPFLAGS"
-	_SAVE_CXX="$CXX"
+        _SAVE_CXXFLAGS="$CXXFLAGS"
+        _SAVE_CPPFLAGS="$CPPFLAGS"
+        _SAVE_CXX="$CXX"
         CXXFLAGS="$HOST_CXXFLAGS"
         CPPFLAGS="$HOST_CPPFLAGS"
         CXX="$HOST_CXX"
         AC_CACHE_CHECK(for host gcc c++0x headers bug without rtti,
             ac_cv_host_cxx0x_headers_bug,
             [AC_TRY_COMPILE([#include <memory>], [],
                             ac_cv_host_cxx0x_headers_bug="no",
                             ac_cv_host_cxx0x_headers_bug="yes")])
@@ -200,21 +202,21 @@ EOF
             CXXFLAGS="$CXXFLAGS -I$_topsrcdir/build/unix/headers"
             AC_CACHE_CHECK(whether workaround for host gcc c++0x headers conflict with host clang works,
                 ac_cv_host_cxx0x_clang_workaround,
                 [AC_TRY_COMPILE([#include <memory>], [],
                                 ac_cv_host_cxx0x_clang_workaround="yes",
                                 ac_cv_host_cxx0x_clang_workaround="no")])
 
             if test "ac_cv_host_cxx0x_clang_workaround" = "no"; then
-                AC_MSG_ERROR([Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
+                AC_MSG_ERROR([Your host toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
             fi
             HOST_CXXFLAGS="$CXXFLAGS"
         elif test "$ac_cv_host_cxx0x_headers_bug" = "yes"; then
-            AC_MSG_ERROR([Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
+            AC_MSG_ERROR([Your host toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
         fi
-	CXXFLAGS="$_SAVE_CXXFLAGS"
-	CPPFLAGS="$_SAVE_CPPFLAGS"
-	CXX="$_SAVE_CXX"
+        CXXFLAGS="$_SAVE_CXXFLAGS"
+        CPPFLAGS="$_SAVE_CPPFLAGS"
+        CXX="$_SAVE_CXX"
     fi
 fi
 AC_LANG_C
 ])