re PR middle-end/41357 (libgomp build fail)
authorDave Korn <dave.korn.cygwin@gmail.com>
Tue, 22 Sep 2009 01:33:53 +0000 (01:33 +0000)
committerDave Korn <davek@gcc.gnu.org>
Tue, 22 Sep 2009 01:33:53 +0000 (01:33 +0000)
PR middle-end/41357
* varasm.c (default_encode_section_info): Copy TLS model into
sym_ref flags regardless of backend support for TLS, for all
model types except TLS_MODEL_EMULATED.

From-SVN: r151959

gcc/ChangeLog
gcc/varasm.c

index 39f3489..4d72c8b 100644 (file)
@@ -1,5 +1,12 @@
 2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
 
+       PR middle-end/41357
+       * varasm.c (default_encode_section_info): Copy TLS model into
+       sym_ref flags regardless of backend support for TLS, for all
+       model types except TLS_MODEL_EMULATED.
+
+2009-09-22  Dave Korn  <dave.korn.cygwin@gmail.com>
+
        PR bootstrap/41404
        * dwarf2out.c (mem_loc_descriptor): Punt on CONST_STRING until
        we can handle it correctly.
index f8cc291..8a61fd2 100644 (file)
@@ -6417,8 +6417,8 @@ default_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
     flags |= SYMBOL_FLAG_FUNCTION;
   if (targetm.binds_local_p (decl))
     flags |= SYMBOL_FLAG_LOCAL;
-  if (targetm.have_tls && TREE_CODE (decl) == VAR_DECL
-      && DECL_THREAD_LOCAL_P (decl))
+  if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL_P (decl)
+      && DECL_TLS_MODEL (decl) != TLS_MODEL_EMULATED)
     flags |= DECL_TLS_MODEL (decl) << SYMBOL_FLAG_TLS_SHIFT;
   else if (targetm.in_small_data_p (decl))
     flags |= SYMBOL_FLAG_SMALL;