This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PING][PATCH] doc: mention that -ftls-model is subject to optimization
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Aug 2013 21:00:18 +0400 (MSK)
- Subject: [PING][PATCH] doc: mention that -ftls-model is subject to optimization
- References: <alpine dot LNX dot 2 dot 00 dot 1307242024280 dot 18265 at monopod dot intra dot ispras dot ru>
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}.
>
>