[PING][PATCH] doc: mention that -ftls-model is subject to optimization

2013-08-09 Thread Alexander Monakov
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  amona...@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}.
 
 


Re: [PATCH] doc: mention that -ftls-model is subject to optimization

2013-08-09 Thread Ian Lance Taylor
On Wed, Jul 24, 2013 at 9:53 AM, Alexander Monakov amona...@ispras.ru wrote:

 2013-07-24  Alexander Monakov  amona...@ispras.ru

 * doc/invoke.texi: Mention that -ftls-model does not force the final
 model.

This is OK.

Thanks.

Ian


[PATCH] doc: mention that -ftls-model is subject to optimization

2013-07-24 Thread Alexander Monakov
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  amona...@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}.