On Wed, Jun 29, 2016 at 11:02 AM, Martin Liška <mli...@suse.cz> wrote: > On 06/28/2016 03:54 PM, Richard Biener wrote: >> I wonder about the inliner change. If one marks a single function >> with -fstack-protector >> that implicitely marks callers with -fno-stack-protector. So I'd >> rather disable inlining >> between different settings here? > > It works in the opposite way, if a caller has the flag disabled and a callee > has, > than the flag is also set to the caller. Honza asked me to propagate the flag > in such manner.
If the intended use-case is to disable stack-protector on specific functions then it is odd if inlining a function with stack-protector on suddenly turns it on for that function. Not sure what the point is in the ability to do that per function anyway (but yes, we can control stack-protector behavior per function). If the intended use-case is only for making it work better across TUs for LTO and we want to be conservative in _en_abling stack protection then your patch accomplishes that. OTOH in that case merging the option in lto-wrapper works as well. > If you prefer to not to inline, I can prepare a patch? So what was your original reason to pursue this? Richard. > > Martin