This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: Use flag_shlib to choose the default TLS model
- From: Daniel Jacobowitz <drow at false dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 Mar 2005 13:23:09 -0500
- Subject: RFA: Use flag_shlib to choose the default TLS model
decl_tls_model selects the default model based on flag_pic. All mips-linux
userspace code is compiled with -fpic, but this doesn't interfere with using
LE or IE model in an executable. The same should be true for PIE objects.
So check flag_shlib instead.
Almost obvious but... OK? Tested on mips-linux-gnu.
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-03-09 Daniel Jacobowitz <dan@codesourcery.com>
* varasm.c (decl_tls_model): Check flag_shlib instead of flag_pic.
Index: gcc/gcc/varasm.c
===================================================================
--- gcc.orig/gcc/varasm.c 2005-03-08 17:18:44.000000000 -0500
+++ gcc/gcc/varasm.c 2005-03-09 10:03:32.000000000 -0500
@@ -4614,7 +4614,7 @@ decl_tls_model (tree decl)
}
is_local = targetm.binds_local_p (decl);
- if (!flag_pic)
+ if (!flag_shlib)
{
if (is_local)
kind = TLS_MODEL_LOCAL_EXEC;