Bug 1261263 - Remove test for libstdc++ headers conflict with clang 3.3. r?froydnj draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 01 Apr 2016 12:05:00 +0900
changeset 346473 ae0709a4832ca8e303dacb926da0c113363e2337
parent 346472 d1ea722351d0bc9c1d888c0805c2256f89ac7632
child 346474 c05bcf4dc6366ef12763d0bc912f086d376005f4
push id14391
push userbmo:mh+mozilla@glandium.org
push dateFri, 01 Apr 2016 06:06:10 +0000
reviewersfroydnj
bugs1261263
milestone48.0a1
Bug 1261263 - Remove test for libstdc++ headers conflict with clang 3.3. r?froydnj Also remove the hack around it.
build/autoconf/toolchain.m4
build/unix/headers/bits/c++config.h
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -186,46 +186,23 @@ AC_CHECK_PROGS(STRIP, "${TOOLCHAIN_PREFI
 AC_CHECK_PROGS(WINDRES, "${TOOLCHAIN_PREFIX}windres", :)
 AC_CHECK_PROGS(OTOOL, "${TOOLCHAIN_PREFIX}otool", :)
 AC_CHECK_PROGS(OBJCOPY, "${TOOLCHAIN_PREFIX}objcopy", :)
 PATH=$_SAVE_PATH
 ])
 
 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])
-        fi
-    elif test "$ac_cv_cxx0x_headers_bug" = "yes"; then
-        AC_MSG_ERROR([Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
-    fi
-
     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
         dnl differences in clang 3.4. However, it supports the 2013-08-28
@@ -305,37 +282,16 @@ EOF
         HOST_CXXFLAGS="$HOST_CXXFLAGS -std=gnu++0x"
 
         _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")])
-
-        if test "$host_compiler" = CLANG -a "$ac_cv_host_cxx0x_headers_bug" = "yes"; then
-            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 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 host toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain])
-        fi
         if test "$host_compiler" = CLANG; then
             AC_TRY_COMPILE([], [#if !__cpp_static_assert
                                 #error ISO WG21 SG10 feature test macros unsupported
                                 #endif],,AC_MSG_ERROR([Only clang/llvm 3.4 or newer supported]))
         fi
 
         CXXFLAGS="$_SAVE_CXXFLAGS"
         CPPFLAGS="$_SAVE_CPPFLAGS"
deleted file mode 100644
--- a/build/unix/headers/bits/c++config.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#include_next <bits/c++config.h>
-#undef _GLIBCXX_USE_FLOAT128