This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Whopr versus weakref
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, dnovillo at google dot com, rguenther at suse dot de
- Date: Tue, 20 Apr 2010 22:51:13 +0200
- Subject: Whopr versus weakref
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?
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