This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/43553] libgcc built with -DHAVE_CC_TLS against xgcc when emutls in use
- From: "developer at sandoe-acoustics dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Apr 2010 11:00:57 -0000
- Subject: [Bug c/43553] libgcc built with -DHAVE_CC_TLS against xgcc when emutls in use
- References: <bug-43553-11113@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #22 from developer at sandoe-acoustics dot co dot uk 2010-04-03 11:00 -------
Created an attachment (id=20299)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20299&action=view)
finalize emutls control vars before varpool_assemble_ending_decls()
This provides a traverse of the emutls control var htab finalizing each.
It allows the race condition patch to be applied without regression.
Hopefully, by inspection, it can be seen that targetm.have_tls will bypass this
and, therefore, this should only effect emutls targets.
I didn't try to check if vars were already finalized in the traversal callback
- on the basis that varpool_finalize_decl is efficient at that itself.
Of course, the disclaimers are:
(a) I'm even newer to this area of gcc than others ;) so...
(b) there might be a much better/more efficient way/place to do this.
Additional: following Paolo's comments on gcc I've updated emutls_decl() to
copy:
TREE_ADDRESSABLE, DECL_VISIBILITY_SPECIFIED, DECL_PRESERVE_P and DECL_INITAL.
I haven't made the efficiency improvement mod.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43553