Commit Graph
15 Commits
Author SHA1 Message Date
Mike Hommey d92d793b54 Bug 1390752 - Avoid std::basic_ios<char, std::char_traits<char>>::operator bool() references. r=froydnj
This is similar to what we had until bug 1278456 removed them when we dropped
support for older libstdc++, but for a different symbol.
2017-08-16 15:03:43 +09:00
Mike Hommey 10248773e3 Bug 1389422 - Avoid @GLIBCXX_3.4.22 symbols from the use of std::thread when building with GCC 6. r=froydnj
That the wrapper implementation works has been verified by creating a
dummy program such as:

  $ cat test.cc
  #include <thread>

  int main() {
    std::thread([]() {
      printf("foo\n");
    }).join();
    return 0;
  }

And compiling it with and without the hack:

  $ g++ -fno-rtti -o test test.cc -lpthread
  $ objdump -TC test | grep UND.*GLIBCXX_3.4.22
  0000000000000000      DF *UND*	0000000000000000  GLIBCXX_3.4.22 std::thread::_State::~_State()
  0000000000000000      DF *UND*	0000000000000000  GLIBCXX_3.4.22 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())

  $ ./test
  foo

  $ g++ -fno-rtti -o test test.cc $objdir/build/unix/stdc++compat/stdc++compat.o -lpthread
  $ objdump -TC test | grep UND.*GLIBCXX_3.4.22
  $ ./test
  foo
2017-08-11 17:20:47 +09:00
Mike Hommey 73bd297084 Bug 1356926 - Make all stdc++compat symbols weak. r=froydnj
In some cases, we can end up linking some things with
--static-libstdc++. The notable (only?) example of that is for the
clang-plugin, and that happens because it gets some of its flags from
llvm-config, which contains --static-libstdc++ because clang itself is
built that way.

When that happens, the combination of --static-libstdc++ and
stdc++compat breaks the build because they have conflicting symbols,
which is very much by design.

There are two ways out of this:
- avoiding either -static-libstdc++ or stdc++compat
- work around the symbol conflicts

The former is not totally reliable ; we'd have to accurately determine
if we're in a potentially conflicting case, and remove one of the two in
that case, and while we can do that for the cases we explicitly know
about, that's not future-proof, and might fail just as much in the
future.

So we go with the latter. The way we do this is by defining all the
std++compat symbols weak, such that at link time, they're overridden by
any symbol with the same name. When building with -static-libstdc++,
libstdc++.a provides those symbols so the linker eliminates the weak
ones. When not building with -static-libstdc++, the linker keeps the
symbols from stdc++compat. That last assertion is validated by the
long-standing CHECK_STDCXX test that we run when linking shared
libraries and programs.

That still leaves the symbols weak in the final shared
libraries/programs, which is a change from the current setup, but
shouldn't cause problems because when using versions of libstdc++.so
that do provide those symbols, it's fine to use the libstdc++.so version
anyways.
2017-08-04 06:07:42 +09:00
Lee Salzman 7061962b6d Bug 1350262 - implement prime rehash policy compat for unordered_map and unordered_set in libstdc++. r=glandium
MozReview-Commit-ID: 1zlGjRMKcBM
2017-05-09 22:15:18 -04:00
Mike Hommey d59ff39dd7 Bug 1278456 - Remove stdc++-compat hacks for libstdc++ < 4.6.1. r=froydnj 2016-06-12 18:52:21 +09:00
Mike Hommey 59af48a75e Bug 1175323 - Bump stdc++compat minimum supported libstdc++ version to 4.3. r=nfroyd 2015-06-18 17:10:39 +09:00
Mike Hommey de1bfbe2db Bug 1153154 - Add stdc++-compat hack for std::string::_S_compare and std::runtime_error::runtime_error. r=nfroyd 2015-04-16 14:35:12 +09:00
Mike Hommey 14616e1450 Bug 1025605 - Add stdc++-compat hack for std::__throw_out_of_range_fmt and __cxa_throw_bad_array_new_length. r=nfroyd 2014-06-19 09:06:14 +09:00
Frank Wein 02db9434c4 Bug 936790 - (gcc 4.5) Build error: "We don't want these libstdc++ symbols to be used" when building with --enable-stdcxx-compat and WebRTC, r=glandium 2013-12-25 13:42:40 +01:00
Mike Hommey 15d04654c0 Bug 932112 - Add stdc++-compat hack for std::__detail::_List_node_base::_M_reverse, necessary for webrtc update. r=nfroyd 2013-10-30 07:42:58 +09:00
Ted Mielczarek a5f71e9296 bug 779291 - Breakpad Makefile changes. r=glandium 2013-03-05 09:41:26 -05:00
Rafael Ávila de Espíndola f74ca2a1ba Bug 846922 - Read late write stacks on windows. r=BenWa. 2013-03-01 19:39:29 -05:00
Randell Jesup 1858ebd2f9 Bug 757637: Rollup makesystem changes for webrtc r=khuey r=ted f=glandium 2012-06-20 07:27:43 -04:00
Gervase Markham cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Mike Hommey 8779364fde Bug 748739 - Link stdc++compat as a static library, and always link it when STDCXX_COMPAT is enabled. r=ted 2012-04-30 08:03:59 +02:00