This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/44139] Exporting emutls symbols from a DLL broken on w32 targets
- From: "dannysmith at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 May 2010 22:43:17 -0000
- Subject: [Bug target/44139] Exporting emutls symbols from a DLL broken on w32 targets
- References: <bug-44139-17370@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from dannysmith at users dot sourceforge dot net 2010-05-18 22:43 -------
(In reply to comment #14)
> Index: gcc/gcc/varasm.c
> ===================================================================
> --- gcc.orig/gcc/varasm.c 2010-05-18 13:19:20.000000000 +0200
> +++ gcc/gcc/varasm.c 2010-05-18 17:10:11.385445300 +0200
> @@ -403,6 +403,8 @@ emutls_decl (tree decl)
> int foo() { return i; }
> __thread int i = 1;
> in which I goes from external to locally defined and initialized. */
> + DECL_DLLIMPORT_P (to) = DECL_DLLIMPORT_P (decl);
> + DECL_ATTRIBUTES (to) = targetm.merge_decl_attributes (decl, to);
>
> TREE_STATIC (to) = TREE_STATIC (decl);
> TREE_USED (to) = TREE_USED (decl);
>
I like this approach better too. It would be even cleaner (here and elswhere)
if we had a decl_with_vis.dllexport_flag and DECL_DLLEXPORT_P. 14 spare bits
left in decl_with_vis. Are they too precious??
Danny
--
dannysmith at users dot sourceforge dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dannysmith at users dot
| |sourceforge dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44139