https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123480
Icenowy Zheng <uwu at icenowy dot me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|MOVED |---
Status|RESOLVED |UNCONFIRMED
--- Comment #24 from Icenowy Zheng <uwu at icenowy dot me> ---
Please note the current title of this bug report, which reports the problem
that -static-libstdc++ pollutes the dynamic symbol list of an executable.
```
(ssh)root@musebook [ ~ ] # g++ test.cpp -static-libstdc++
(ssh)root@musebook [ ~ ] # nm -D ./a.out | grep cxx | wc -l
218
(ssh)root@musebook [ ~ ] # ./a.out
a
(ssh)root@musebook [ ~ ] # cat te
test.c test.cpp
(ssh)root@musebook [ ~ ] # cat test.cpp
#include <iostream>
int main()
{
std::cout << "a" << std::endl;
}
```
Please don't say "the problem should be solved by bear" again. They're solving
it by RIIRing it. And the previous snippet proves that the problem isn't
related to either /usr/bin/gcc or Bear -- it's just related to
`-static-libstdc++` having different behavior with `-Wl,-Bstatic -lz
-Wl,-Bdynamic` .