Backed out changeset 5939320824b1 (bug 894242) "CLOSED TREE"
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 17 Jul 2013 10:36:12 +0200
changeset 138819 7e6eb43139f17be60b31901318c6e38e984c685e
parent 138818 5939320824b1b0231dba75a6c373166f5622d18f
child 138820 d671f193a5da795f0ce9c170d20f38300c8aa43b
push id24969
push useremorley@mozilla.com
push dateWed, 17 Jul 2013 14:44:12 +0000
treeherdermozilla-central@4527a488d1f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs894242
milestone25.0a1
backs out5939320824b1b0231dba75a6c373166f5622d18f
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
Backed out changeset 5939320824b1 (bug 894242) "CLOSED TREE"
configure.in
js/src/Makefile.in
js/src/configure.in
js/src/js-config.in
--- a/configure.in
+++ b/configure.in
@@ -2730,20 +2730,21 @@ AC_CACHE_VAL(ac_cv_have_uname_us_domainn
 
 if test "$ac_cv_have_uname_us_domainname_field" = "true"; then
     AC_DEFINE(HAVE_UNAME_US_DOMAINNAME_FIELD)
     AC_MSG_RESULT(yes)
 else
     AC_MSG_RESULT(no)
 fi
 
-dnl Check whether gcc's c++0x mode works
+dnl Check whether we can use gcc's c++0x mode
 AC_LANG_CPLUSPLUS
 
 if test "$GNU_CXX"; then
+    _SAVE_CXXFLAGS=$CXXFLAGS
     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",
                         ac_cv_cxx0x_headers_bug="yes")])
 
@@ -2751,20 +2752,20 @@ if test "$GNU_CXX"; then
         CXXFLAGS="$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])
+            CXXFLAGS="$_SAVE_CXXFLAGS"
         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])
+        CXXFLAGS="$_SAVE_CXXFLAGS"
     fi
 fi
 
 dnl Check for usable char16_t (2 bytes, unsigned)
 dnl (we might not need the unsignedness check anymore)
 AC_CACHE_CHECK(for usable char16_t (2 bytes, unsigned),
     ac_cv_have_usable_char16_t,
     [AC_TRY_COMPILE([$configure_static_assert_macros],
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -505,17 +505,17 @@ JS_CONFIG_SUBSTITUTIONS=\
 	-DJS_CONFIG_LIBS="$(JS_CONFIG_LIBS)" \
 	-DJS_CONFIG_MOZ_JS_LIBS="$(JS_CONFIG_MOZ_JS_LIBS)" \
 	-DMOZJS_MAJOR_VERSION="$(MOZJS_MAJOR_VERSION)" \
 	-DMOZJS_MINOR_VERSION="$(MOZJS_MINOR_VERSION)" \
 	-DMOZJS_PATCH_VERSION="$(MOZJS_PATCH_VERSION)" \
 	-DMOZJS_ALPHA="$(MOZJS_ALPHA)" \
 	-DNSPR_CFLAGS="$(NSPR_CFLAGS)" \
 	-DNSPR_PKGCONF_CHECK="$(NSPR_PKGCONF_CHECK)" \
-	$(NULL)
+	-DUSE_CXX11="$(USE_CXX11)"
 
 $(JS_CONFIG_NAME): js-config.in Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk $(topsrcdir)/config/rules.mk
 	$(RM) $@.tmp
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py --marker % $(JS_CONFIG_SUBSTITUTIONS) $< > $@.tmp \
 	&& mv $@.tmp $@ && chmod +x $@
 
 SCRIPTS = $(JS_CONFIG_NAME)
 SDK_BINARY = $(JS_CONFIG_NAME)
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2342,41 +2342,45 @@ AC_CACHE_VAL(ac_cv_have_uname_us_domainn
 
 if test "$ac_cv_have_uname_us_domainname_field" = "true"; then
     AC_DEFINE(HAVE_UNAME_US_DOMAINNAME_FIELD)
     AC_MSG_RESULT(yes)
 else
     AC_MSG_RESULT(no)
 fi
 
-dnl Check whether gcc's c++0x mode works
+dnl Check whether we can use gcc's c++0x mode
 AC_LANG_CPLUSPLUS
 
 if test "$GNU_CXX"; then
+    _SAVE_CXXFLAGS=$CXXFLAGS
     CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+    USE_CXX11=1
 
     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"
         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])
+            CXXFLAGS="$_SAVE_CXXFLAGS"
+            USE_CXX11=
         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])
+        CXXFLAGS="$_SAVE_CXXFLAGS"
+            USE_CXX11=
     fi
 fi
 
 AC_LANG_C
 
 dnl Check for .hidden assembler directive and visibility attribute.
 dnl Borrowed from glibc configure.in
 dnl ===============================================================
@@ -4265,16 +4269,17 @@ AC_SUBST(TARGET_MD_ARCH)
 AC_SUBST(TARGET_XPCOM_ABI)
 AC_SUBST(OS_TARGET)
 AC_SUBST(OS_ARCH)
 AC_SUBST(OS_RELEASE)
 AC_SUBST(OS_TEST)
 AC_SUBST(CPU_ARCH)
 AC_SUBST(INTEL_ARCHITECTURE)
 
+AC_SUBST(USE_CXX11)
 AC_SUBST(WRAP_LDFLAGS)
 AC_SUBST(MKSHLIB)
 AC_SUBST(MKCSHLIB)
 AC_SUBST(MKSHLIB_FORCE_ALL)
 AC_SUBST(MKSHLIB_UNFORCE_ALL)
 AC_SUBST(DSO_CFLAGS)
 AC_SUBST(DSO_PIC_CFLAGS)
 AC_SUBST(DSO_LDOPTS)
--- a/js/src/js-config.in
+++ b/js/src/js-config.in
@@ -104,14 +104,18 @@ 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/$LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$LIBRARY_NAME $NSPR_CFLAGS"
+    cflags="-include $includedir/$LIBRARY_NAME/js/RequiredDefines.h -I$includedir/$LIBRARY_NAME $NSPR_CFLAGS"
+    if test '@USE_CXX11@' = "1"; then
+        cflags="$cflags -std=gnu++0x"
+    fi
+    echo $cflags
 fi
 
 if test "$echo_libs" = "yes"; then
     echo "$MOZ_JS_LIBS $JS_CONFIG_LIBS"
 fi