Whopr versus weakref

Jan Hubicka hubicka@ucw.cz
Tue Apr 20 21:31:00 GMT 2010


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



More information about the Gcc-patches mailing list