Message ID | alpine.LNX.2.00.1307242024280.18265@monopod.intra.ispras.ru |
---|---|
State | New |
Headers | show |
Ping. I've tried to phrase the additional doc text as concisely as possible. Would a runtime warning be more appropriate? Thanks. On Wed, 24 Jul 2013, Alexander Monakov wrote: > Hello, > > As discussed here, the current behavior of -ftls-model is intended: > http://gcc.gnu.org/ml/gcc/2013-07/msg00248.html > (in short: unlike the attribute, -ftls-model sets a "most general" model to be > used, but the compiler can use a less general model than specified, making it > impossible to set global-dynamic model on the command line for non-PIC code). > > I'd like to add a clarification to the docs. OK for trunk? > > 2013-07-24 Alexander Monakov <amonakov@ispras.ru> > > * doc/invoke.texi: Mention that -ftls-model does not force the final > model. > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index d99d217..4d1fbee 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -20802,6 +20802,9 @@ Not all targets provide complete support for this switch. > Alter the thread-local storage model to be used (@pxref{Thread-Local}). > The @var{model} argument should be one of @code{global-dynamic}, > @code{local-dynamic}, @code{initial-exec} or @code{local-exec}. > +Note that the choice is subject to optimization: the compiler may use > +a more efficient model for symbols not visible outside of the translation > +unit, or if @option{-fpic} is not given on the command line. > > The default without @option{-fpic} is @code{initial-exec}; with > @option{-fpic} the default is @code{global-dynamic}. > >
On Wed, Jul 24, 2013 at 9:53 AM, Alexander Monakov <amonakov@ispras.ru> wrote: > > 2013-07-24 Alexander Monakov <amonakov@ispras.ru> > > * doc/invoke.texi: Mention that -ftls-model does not force the final > model. This is OK. Thanks. Ian
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d99d217..4d1fbee 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -20802,6 +20802,9 @@ Not all targets provide complete support for this switch. Alter the thread-local storage model to be used (@pxref{Thread-Local}). The @var{model} argument should be one of @code{global-dynamic}, @code{local-dynamic}, @code{initial-exec} or @code{local-exec}. +Note that the choice is subject to optimization: the compiler may use +a more efficient model for symbols not visible outside of the translation +unit, or if @option{-fpic} is not given on the command line. The default without @option{-fpic} is @code{initial-exec}; with @option{-fpic} the default is @code{global-dynamic}.