build: Disallow dynamic linking against c++ library
Summary:
Ever since statically linking Qt, we've been linking the C++ library
statically too (-static-libstdc++). Take this into
account in the symbol checker.
This is a partial backport of core#17569
https://github.com/bitcoin/bitcoin/pull/17569/commits/b77d5ad59fb9f3f26d919ee6c33ae732382de504
Test Plan: gitian builds on CI
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13459