Bug 1691865 - Clean up stdc++compat after bug 1634204. r=firefox-build-system-reviewers,dmajor
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 10 Feb 2021 21:14:52 +0000
changeset 566880 d427e73d544835c79d904603f6fe4708398cfab4
parent 566879 b655e0885f94ab5d4b9b4afda4b8304f93061d22
child 566881 a3e891811b75d37034f7ab0446b3a510f083223f
push id38191
push userbtara@mozilla.com
push dateThu, 11 Feb 2021 05:02:45 +0000
treeherdermozilla-central@5cbcb80f72bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, dmajor
bugs1691865, 1634204
milestone87.0a1
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
Bug 1691865 - Clean up stdc++compat after bug 1634204. r=firefox-build-system-reviewers,dmajor Bug 1634204 bumped the maximum version of symbols allowed in our dependency upon libstdc++, which effectively makes some of the stdc++compat code dead. We can now remove it. Differential Revision: https://phabricator.services.mozilla.com/D104617
build/unix/stdc++compat/stdc++compat.cpp
--- a/build/unix/stdc++compat/stdc++compat.cpp
+++ b/build/unix/stdc++compat/stdc++compat.cpp
@@ -5,61 +5,33 @@
 #include <ostream>
 #include <istream>
 #include <string>
 #include <stdarg.h>
 #include <stdio.h>
 #include <mozilla/Assertions.h>
 #include <cxxabi.h>
 
-/* GLIBCXX_3.4.16 is from gcc 4.6.1 (172240)
-   GLIBCXX_3.4.17 is from gcc 4.7.0 (174383)
-   GLIBCXX_3.4.18 is from gcc 4.8.0 (190787)
+/*
    GLIBCXX_3.4.19 is from gcc 4.8.1 (199309)
    GLIBCXX_3.4.20 is from gcc 4.9.0 (199307)
    GLIBCXX_3.4.21 is from gcc 5.0 (210290)
    GLIBCXX_3.4.22 is from gcc 6.0 (222482)
    GLIBCXX_3.4.23 is from gcc 7.0
 
 This file adds the necessary compatibility tricks to avoid symbols with
-version GLIBCXX_3.4.17 and bigger, keeping binary compatibility with
-libstdc++ 4.7.
+version GLIBCXX_3.4.20 and bigger, keeping binary compatibility with
+libstdc++ 4.8.1.
 
 WARNING: all symbols from this file must be defined weak when they
 overlap with libstdc++.
 */
 
 #define GLIBCXX_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
 
-#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 18)
-// Implementation of utility functions for the prime rehash policy used in
-// unordered_map and unordered_set.
-#  include <unordered_map>
-#  include <tr1/unordered_map>
-namespace std {
-size_t __attribute__((weak))
-__detail::_Prime_rehash_policy::_M_next_bkt(size_t __n) const {
-  tr1::__detail::_Prime_rehash_policy policy(_M_max_load_factor);
-  size_t ret = policy._M_next_bkt(__n);
-  _M_next_resize = policy._M_next_resize;
-  return ret;
-}
-
-pair<bool, size_t> __attribute__((weak))
-__detail::_Prime_rehash_policy::_M_need_rehash(size_t __n_bkt, size_t __n_elt,
-                                               size_t __n_ins) const {
-  tr1::__detail::_Prime_rehash_policy policy(_M_max_load_factor);
-  policy._M_next_resize = _M_next_resize;
-  pair<bool, size_t> ret = policy._M_need_rehash(__n_bkt, __n_elt, __n_ins);
-  _M_next_resize = policy._M_next_resize;
-  return ret;
-}
-}  // namespace std
-#endif
-
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 20)
 namespace std {
 
 /* We shouldn't be throwing exceptions at all, but it sadly turns out
    we call STL (inline) functions that do. */
 void __attribute__((weak)) __throw_out_of_range_fmt(char const* fmt, ...) {
   va_list ap;
   char buf[1024];  // That should be big enough.