Re:Windows is not a Microsoft Visual C/C++ Run-Time delivery...
by vetinari on Saturday April 12, 2014 @04:17PM
(#7579029)
glibc itself is not supposed to be linked statically, because it itself dlopens other shared libraries - for pam, for nsswitch, etc. These are system specific (as configured by admin), so there is no one size fits all.
You may statically link another libc, but then the users may wonder why your app does not works as it should, when they configure nsswitch for example and your app will not respect that.
My team's product is moving to statically link libstdc++ and libgcc thanks to the runtime linking exception in GCC. It will allow us to use C++11 on old systems. We are grateful that libstdc++ is backwards compatible to GCC 3.4 (other libstdc++'s can link against us)!
I'm looking into statically linking musl libc so our product could (in theory) run on any 2.6/3.0 kernel. =)