3 ms·
What can you do for the situation where you ship a library instead of an executable? My team's product is moving to statically link libstdc++ and libgcc thanks
by jevinskie 13y ago
What can you do for the situation where you ship a library instead of an executable?
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. =)
- vetinari 13y agoglibc 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.