Bug 901149 - Add the clang workaround for __float128 to HOST_CXXFLAGS when not cross-compiling. r=ted, a=akeybl
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 06 Aug 2013 10:08:23 +0900
changeset 153670 67a933f6521ff4976544052387acb6ea609c007e
parent 153669 e21f27c948358aeabf652e6bf7f01543f91a073a
child 153671 09b3abb00078d1a0e33291ae3a1e3a6947d5b03a
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, akeybl
bugs901149
milestone25.0a2
Bug 901149 - Add the clang workaround for __float128 to HOST_CXXFLAGS when not cross-compiling. r=ted, a=akeybl
build/autoconf/toolchain.m4
js/src/build/autoconf/toolchain.m4
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -145,25 +145,27 @@ 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"
+    _ADDED_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",
                         ac_cv_cxx0x_headers_bug="yes")])
 
     if test "$CLANG_CXX" -a "$ac_cv_cxx0x_headers_bug" = "yes"; then
         CXXFLAGS="$CXXFLAGS -I$_topsrcdir/build/unix/headers"
+        _ADDED_CXXFLAGS="$_ADDED_CXXFLAGS -I$_topsrcdir/build/unix/headers"
         AC_CACHE_CHECK(whether workaround for gcc c++0x headers conflict with clang works,
             ac_cv_cxx0x_clang_workaround,
             [AC_TRY_COMPILE([#include <memory>], [],
                             ac_cv_cxx0x_clang_workaround="yes",
                             ac_cv_cxx0x_clang_workaround="no")])
 
         if test "ac_cv_cxx0x_clang_workaround" = "no"; then
             AC_MSG_ERROR([Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
@@ -213,12 +215,12 @@ EOF
         elif test "$ac_cv_host_cxx0x_headers_bug" = "yes"; then
             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"
     fi
 elif test "$GNU_CXX"; then
-    HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++0x"
+    HOST_CXXFLAGS="$HOST_CXXFLAGS $_ADDED_CXXFLAGS"
 fi
 AC_LANG_C
 ])
--- a/js/src/build/autoconf/toolchain.m4
+++ b/js/src/build/autoconf/toolchain.m4
@@ -145,25 +145,27 @@ 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"
+    _ADDED_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",
                         ac_cv_cxx0x_headers_bug="yes")])
 
     if test "$CLANG_CXX" -a "$ac_cv_cxx0x_headers_bug" = "yes"; then
         CXXFLAGS="$CXXFLAGS -I$_topsrcdir/build/unix/headers"
+        _ADDED_CXXFLAGS="$_ADDED_CXXFLAGS -I$_topsrcdir/build/unix/headers"
         AC_CACHE_CHECK(whether workaround for gcc c++0x headers conflict with clang works,
             ac_cv_cxx0x_clang_workaround,
             [AC_TRY_COMPILE([#include <memory>], [],
                             ac_cv_cxx0x_clang_workaround="yes",
                             ac_cv_cxx0x_clang_workaround="no")])
 
         if test "ac_cv_cxx0x_clang_workaround" = "no"; then
             AC_MSG_ERROR([Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
@@ -213,12 +215,12 @@ EOF
         elif test "$ac_cv_host_cxx0x_headers_bug" = "yes"; then
             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"
     fi
 elif test "$GNU_CXX"; then
-    HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++0x"
+    HOST_CXXFLAGS="$HOST_CXXFLAGS $_ADDED_CXXFLAGS"
 fi
 AC_LANG_C
 ])