Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread Andrew Pinski
On Tue, Jul 2, 2013 at 2:09 PM, David Malcolm wrote: > On Tue, 2013-07-02 at 13:54 -0700, Andrew Pinski wrote: >> On Mon, Jul 1, 2013 at 8:36 AM, David Malcolm wrote: >> > My plan for removal of global variables in gcc 4.9 [1] calls for several >> > hundred new classes, which will be singletons i

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 20:49 +, Joseph S. Myers wrote: > On Tue, 2 Jul 2013, David Malcolm wrote: > > > So I envisage a "--enable-shared" configuration switch to opt-in to the > > shared library code, but I want as minimize the difference between the > > two cases. > > --enable-host-shared or

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 13:54 -0700, Andrew Pinski wrote: > On Mon, Jul 1, 2013 at 8:36 AM, David Malcolm wrote: > > My plan for removal of global variables in gcc 4.9 [1] calls for several > > hundred new classes, which will be singletons in a classic monolithic > > build, but have multiple instanc

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread Andrew Pinski
On Mon, Jul 1, 2013 at 8:36 AM, David Malcolm wrote: > My plan for removal of global variables in gcc 4.9 [1] calls for several > hundred new classes, which will be singletons in a classic monolithic > build, but have multiple instances in a shared-library build. > > In order to avoid the register

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread Joseph S. Myers
On Tue, 2 Jul 2013, David Malcolm wrote: > So I envisage a "--enable-shared" configuration switch to opt-in to the > shared library code, but I want as minimize the difference between the > two cases. --enable-host-shared or --enable-shared-gcc or some other such option name, please, not plain -

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 08:16 +0200, Marc Glisse wrote: > On Mon, 1 Jul 2013, Gabriel Dos Reis wrote: > > > On Mon, Jul 1, 2013 at 10:36 AM, David Malcolm wrote: > >> My plan for removal of global variables in gcc 4.9 [1] calls for several > >> hundred new classes, which will be singletons in a cla

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread David Malcolm
On Tue, 2013-07-02 at 06:37 -0500, Gabriel Dos Reis wrote: > On Tue, Jul 2, 2013 at 1:16 AM, Marc Glisse wrote: > > On Mon, 1 Jul 2013, Gabriel Dos Reis wrote: > > > >> On Mon, Jul 1, 2013 at 10:36 AM, David Malcolm > >> wrote: > >>> > >>> My plan for removal of global variables in gcc 4.9 [1] ca

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-02 Thread Gabriel Dos Reis
On Tue, Jul 2, 2013 at 1:16 AM, Marc Glisse wrote: > On Mon, 1 Jul 2013, Gabriel Dos Reis wrote: > >> On Mon, Jul 1, 2013 at 10:36 AM, David Malcolm >> wrote: >>> >>> My plan for removal of global variables in gcc 4.9 [1] calls for several >>> hundred new classes, which will be singletons in a cl

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-01 Thread Marc Glisse
On Mon, 1 Jul 2013, Gabriel Dos Reis wrote: On Mon, Jul 1, 2013 at 10:36 AM, David Malcolm wrote: My plan for removal of global variables in gcc 4.9 [1] calls for several hundred new classes, which will be singletons in a classic monolithic build, but have multiple instances in a shared-librar

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-01 Thread Gabriel Dos Reis
On Mon, Jul 1, 2013 at 10:36 AM, David Malcolm wrote: > My plan for removal of global variables in gcc 4.9 [1] calls for several > hundred new classes, which will be singletons in a classic monolithic > build, but have multiple instances in a shared-library build. > > In order to avoid the registe

Re: [C++ PATCH] Implement new "force_static" attribute

2013-07-01 Thread David Malcolm
On Mon, 2013-07-01 at 11:36 -0400, David Malcolm wrote: Sorry, I forgot the ChangeLog entries: gcc/ 2013-07-01 David Malcolm * doc/extend.texi (Type Attributes): Document new "force_static" attribute. gcc/cp/ 2013-07-01 David Malcolm * cp-tree.h (struct lang_type_

[C++ PATCH] Implement new "force_static" attribute

2013-07-01 Thread David Malcolm
My plan for removal of global variables in gcc 4.9 [1] calls for several hundred new classes, which will be singletons in a classic monolithic build, but have multiple instances in a shared-library build. In order to avoid the register pressure of passing a redundant "this" pointer around for the