On Tue, 3 Sep 2019 at 10:49, Jonathan Wakely wrote: > > On Tue, 3 Sep 2019 at 09:08, yao zhuang <secularbird.eagle@xxxxxxxxx> wrote: > > > > Hello > > > > We want to use -fstack-protector to protect our program, but when adding > > this flag, gcc will link libssp_nonshared which is a static library, not a > > runtime library. > > I think you are confusing "runtime library" and "dynamic library". > > > Does It means that if we want to using -fstack-protector, > > we need to follow gplv3, not gplv3-with-runtime-exception? Is this correct? > > No, that's entirely incorrect. > > The runtime exception doesn't distinguish between static linking and Sorry, I meant to say the GPL doesn't distinguish between static linking and dynamic linking, and neither does the runtime exception. > dynamic linking, and neither does the runtime exception, as clearly > stated in its FAQ: > "neither the GPL nor the GCC Runtime Library Exception distinguish > between static linking, dynamic linking, and other methods for > combining code in their conditions. The same permissions are available > to you, under the same terms, no matter which method you use." > https://www.gnu.org/licenses/gcc-exception-3.1-faq.html