Bug 655216 - Avoid GLIBCXX_3.4.14 symbol versions at some optimization levels. r=tglek
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 06 May 2011 10:19:26 +0200
changeset 71343 e300498f80798dec4dbef3fbc7dcd6e6dbc2430b
parent 71342 d95b370f0f85129f0fa991611a57ef463cba635b
child 71344 c72829d9cb2b5b69158037b6a224477d32b60ea0
push idunknown
push userunknown
push dateunknown
reviewerstglek
bugs655216
milestone7.0a1
Bug 655216 - Avoid GLIBCXX_3.4.14 symbol versions at some optimization levels. r=tglek
build/stdc++compat.cpp
--- a/build/stdc++compat.cpp
+++ b/build/stdc++compat.cpp
@@ -32,20 +32,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include <ostream>
 #include <istream>
-#ifdef DEBUG
 #include <string>
-#endif
-
 
 /* GLIBCXX_3.4.8  is from gcc 4.1.1 (111691)
    GLIBCXX_3.4.9  is from gcc 4.2.0 (111690)
    GLIBCXX_3.4.10 is from gcc 4.3.0 (126287)
    GLIBCXX_3.4.11 is from gcc 4.4.0 (133006)
    GLIBCXX_3.4.12 is from gcc 4.4.1 (147138)
    GLIBCXX_3.4.13 is from gcc 4.4.2 (151127)
    GLIBCXX_3.4.14 is from gcc 4.5.0 (151126)
@@ -58,33 +55,31 @@ namespace std {
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 9)
     /* Instantiate these templates to avoid GLIBCXX_3.4.9 symbol versions */
     template ostream& ostream::_M_insert(double);
     template ostream& ostream::_M_insert(long);
     template ostream& ostream::_M_insert(unsigned long);
     template ostream& __ostream_insert(ostream&, const char*, streamsize);
     template istream& istream::_M_extract(double&);
 #endif
-#ifdef DEBUG
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 14)
     /* Instantiate these templates to avoid GLIBCXX_3.4.14 symbol versions
-     * in debug builds */
+     * depending on optimization level */
     template char *string::_S_construct_aux_2(size_type, char, allocator<char> const&);
 #ifdef _GLIBCXX_USE_WCHAR_T
     template wchar_t *wstring::_S_construct_aux_2(size_type, wchar_t, allocator<wchar_t> const&);
 #endif /* _GLIBCXX_USE_WCHAR_T */
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
     template string::basic_string(string&&);
     template string& string::operator=(string&&);
     template wstring::basic_string(wstring&&);
     template wstring& wstring::operator=(wstring&&);
     template wstring& wstring::assign(wstring&&);
 #endif /* __GXX_EXPERIMENTAL_CXX0X__ */
 #endif /* (__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) */
-#endif /* DEBUG */
 }
 
 namespace std __attribute__((visibility("default"))) {
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 14)
     /* Hack to avoid GLIBCXX_3.4.14 symbol versions */
     struct _List_node_base
     {
         void hook(_List_node_base * const __position) throw ();