Bug 1269171 - Backout ccff1c4580ab (
bug 1270832) because it doesn't actually work properly and blocks upcoming changes.
It turns out that, since we're including <new> before setting
_GLIBCXX_DEBUG, the debug parts of c++config.h are not activated, and
that has an impact of how much of the debug features of the STL are
activated.
In contrast, the upcoming changes to the STL wrappers are avoiding the
include of <new> before _GLIBCXX_DEBUG is set, which in turn breaks the
build because, as we link things that use STL wrappers with things that
don't, they end up with a different state of STL debugging, and have
mismatching symbols.
--- a/config/gcc-stl-wrapper.template.h
+++ b/config/gcc-stl-wrapper.template.h
@@ -38,22 +38,24 @@
# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
# include "mozilla/mozalloc.h"
# else
# error "STL code can only be used with infallible ::operator new()"
# endif
#endif
-// Don't enable debug mode with the clang plugin; clang doesn't recognize
-// the debug/ versions of the stdlib headers as being system headers, leading
-// to complaints about code that's out of our control.
-#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) && !defined(MOZ_CLANG_PLUGIN)
+#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
// Enable checked iterators and other goodies
- # define _GLIBCXX_DEBUG 1
+//
+// FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
+// Figure out how to resolve this with -fno-rtti. Maybe build with
+// -frtti in DEBUG builds?
+//
+// # define _GLIBCXX_DEBUG 1
#endif
#pragma GCC visibility push(default)
#include_next <${HEADER}>
#pragma GCC visibility pop
// gcc calls a __throw_*() function from bits/functexcept.h when it
// wants to "throw an exception". functexcept exists nominally to