configure: Disable linker warnings for common symbols
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Fri, 23 Feb 2024 17:54:10 +0000 (18:54 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 21 Jun 2026 15:59:33 +0000 (17:59 +0200)
commit247ad1199feaae68c0224cace9407ef1a940f85b
treeb6112806c7480e0897231ab1e04055f29fd65571
parent9e357486d1eeb16df18c3f82b6d23c6551fa43e0
configure: Disable linker warnings for common symbols

Common symbols are not part of ISO-C and therefore not used
by FFmpeg at all. Yet linker warnings to ensure it stays
that way are nevertheless wrong, because the existence of
common symbols does not imply that there is a bug in our code.

More precisely, Clang's ASAN implementation uses a common symbol
___asan_globals_registered when used on Elf targets with
the -fsanitize-address-globals-dead-stripping option;
said option is the default since Clang 17 [1].
This leads to 1883 warnings about ___asan_globals_registered
when linking here.
(Even without that option there were warnings like
_ZN14__interception10real_vforkE being overridden.)

Said warning is also unnecessary: The proper way to ensure
that our code is free of common symbols is to let the compiler
enforce this. But this is already the default since GCC 10
and Clang 11, so there is no risk of introducing our own
common symbols.

[1]: https://reviews.llvm.org/D152604

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit 25e0e087c4314730d42ac16061962904b8fb3ae6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
configure