[CMAKE] Add an option to statically link libstdc++
Summary:
The -static-libstdc++ linker flag is passed manually through the
environment variable LDFLAGS when running configure configure for
the Linux gitian build.
Test Plan:
cmake -DENABLE_STATIC_LIBSTDCXX=ON -GNinja .. ninja readelf -d src/bitcoind | grep libstdc++
Grep should return nothing.
cmake -DENABLE_STATIC_LIBSTDCXX=OFF -GNinja .. ninja readelf -d src/bitcoind | grep libstdc++
Grep should return a line containing:
Shared library: [libstdc++.so.x]
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D2966