gecko-dev/build/unix
Mike Hommey 118fd76cf0 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
..
build-binutils
build-gcc Bug 1386588 - Change the GCC build script to be future-proof. r=gps 2017-08-03 08:12:47 +09:00
build-gtk3
build-hfsplus
elfhack Bug 1385910 - In the error message, also ask to upload the pre-elfhacked library r=froydnj 2017-07-31 16:35:03 +02:00
stdc++compat Bug 1356926 - Make all stdc++compat symbols weak. r=froydnj 2017-08-04 06:07:42 +09:00
aix.exp
moz.build
mozconfig.asan
mozconfig.fuzzing Bug 1376968 - Remove obsolete -fsantize-coverage=edge from fuzzing config. r=decoder 2017-06-28 15:58:42 -07:00
mozconfig.gtk
mozconfig.linux
mozconfig.linux32
mozconfig.stdcxx Bug 1365182 - When both clang and gcc are installed via tooltool, pick libstdc++ from gcc. r=froydnj 2017-05-16 15:09:52 +09:00
mozconfig.tsan
mozilla.in
print-failed-commands.sh
print-non-newline.sh
rewrite_asan_dylib.py
run-gprof.sh
run-hiprof.sh
run-mozilla.sh
run-third.sh