Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-15 Thread Uros Bizjak
On Mon, Apr 15, 2013 at 8:30 AM, Andrew Hsieh wrote: > Sure. Put back Init(SSP_TLS) and rebase to r197955. > If no further feedback, please merge. Committed with slightly changed ChangeLog entry: 2013-04-15 Andrew Hsieh * config/i386/i386.opt: New option mstack-protector-guard=. * c

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-14 Thread Andrew Hsieh
Sure. Put back Init(SSP_TLS) and rebase to r197955. If no further feedback, please merge. 2013-04-15 Andrew Hsieh * config/i386/i386.opt: New option mstack-protector-guard=. * config/i386/i386-opts.h: Add enum stack_protector_guard. * config/i386/i386.h: Introduce TARG

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-12 Thread Uros Bizjak
On Fri, Apr 12, 2013 at 12:28 PM, Andrew Hsieh wrote: > One question: If I drop Init(SSP_TLS), I got the following error > during compilation: >options.c:1122:1: error: invalid conversion from 'int' to > 'stack_protector_guard' [-fpermissive] > It's because w/o Init(SSP_TLS), '0' is placed in

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-12 Thread Andrew Hsieh
One question: If I drop Init(SSP_TLS), I got the following error during compilation: options.c:1122:1: error: invalid conversion from 'int' to 'stack_protector_guard' [-fpermissive] It's because w/o Init(SSP_TLS), '0' is placed in global_options_init where enum stack_protector_guard is expected.

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-12 Thread Andrew Hsieh
Changed comment, corrected formatting, and removed Init(SSP_TLS). Thanks! = 2013-04-12 Andrew Hsieh * config/i386/i386.opt: New option mstack-protector-guard=. * config/i386/i386-opts.h: Add enum stack_protector_guard. * config/i386/i386.h: Introduce TARGET_SSP_GLO

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-12 Thread Uros Bizjak
On Fri, Apr 12, 2013 at 10:43 AM, Andrew Hsieh wrote: > Introduced TARGET_SSP_GLOBAL_GUARD and TARGET_SSP_TLS_GUARD as suggested. > As for handling default in ix86_option_override_internal, is it > possible to achieve the same "default to SSP_GLOBAL if bionic" > entirely in i386.opt? No, AFAIK op

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-12 Thread Jakub Jelinek
On Fri, Apr 12, 2013 at 04:43:51PM +0800, Andrew Hsieh wrote: > --- gcc/config/i386/i386-opts.h (revision 197837) > +++ gcc/config/i386/i386-opts.h (working copy) > @@ -85,4 +85,9 @@ >ix86_veclibabi_type_acml > }; > > +enum stack_protector_guard { > + SSP_TLS, /* per-thread canary at %g

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-12 Thread Andrew Hsieh
Introduced TARGET_SSP_GLOBAL_GUARD and TARGET_SSP_TLS_GUARD as suggested. As for handling default in ix86_option_override_internal, is it possible to achieve the same "default to SSP_GLOBAL if bionic" entirely in i386.opt? === 2013-04-12 Andrew Hsieh * config/i386/i386.opt: New option

Re: [PATCH,i386] Add -mstack-protector-guard= for i386

2013-04-11 Thread Uros Bizjak
Hello! > Bionic in Android 4.2 starts to support stack-protector canary at TLS for x86. > > Android prior to 4.2 still looks at a global variable for stack > canary. To maintain backward compatibility, I propose to add a new > option -mstack-protector-guard={global,tls} for i386 back-end to use >