Whopr versus weakref
Richard Guenther
rguenther@suse.de
Wed Apr 21 09:30:00 GMT 2010
On Tue, 20 Apr 2010, Jan Hubicka wrote:
> Hi,
> buiding whopr I get error on weakref alias in pthread library. We must bring
> functions public for ltrans split yet weakrefs are defined for static variables
> only. I am not sure what to do here, but I think it is safe to weaken the
> check for ltrans so we always end up with weak reference.
>
> Or better ideas?
Can't we avoid bringing these functions public by putting them into
a proper partition? Otherwise we risk breaking code when we suddenly
change symbol linkage, no? Think of using whopr to do partial
linking of {a.c, b.c} -> x.o and {c.c, d.c} -> y.o and then linking
x.o and y.o.
Richard.
> With all the patches I can now build working DLV that works comparably
> well to LTO version.
>
> Bootstrapped/regtested x86_64-linux, OK?
>
> Honza
>
> * varasm.c (assemble_alias): Do not worry about public weakrefs
> in whopr.
> Index: varasm.c
> ===================================================================
> --- varasm.c (revision 158563)
> +++ varasm.c (working copy)
> @@ -5749,7 +5749,7 @@ assemble_alias (tree decl, tree target)
> TREE_CHAIN (alias) = target;
> #endif
> }
> - if (TREE_PUBLIC (decl))
> + if (TREE_PUBLIC (decl) && !flag_ltrans)
> error ("weakref %q+D must have static linkage", decl);
> }
> else
>
>
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
More information about the Gcc-patches
mailing list