------- Comment #10 from howarth at nitro dot med dot uc dot edu  2010-02-13 
16:04 -------
This alternative fix works as well...

--- /Users/howarth/gcc-4.5-20100211/gcc/varasm.c        2010-01-20
18:46:25.000000000 -0500
+++ gcc/varasm.c        2010-02-13 10:58:45.000000000 -0500
@@ -2345,7 +2345,8 @@
         for declarations that can be weak, it happens to be
         match.  */
       && !TREE_STATIC (decl)
-      && lookup_attribute ("weak", DECL_ATTRIBUTES (decl))
+      && ( lookup_attribute ("weak", DECL_ATTRIBUTES (decl)) ||
+      lookup_attribute ("weak_import", DECL_ATTRIBUTES (decl)))
       && value_member (decl, weak_decls) == NULL_TREE)
     weak_decls = tree_cons (NULL, decl, weak_decls);

@@ -5290,9 +5291,11 @@
     warning (0, "weak declaration of %q+D not supported", decl);

   mark_weak (decl);
+#ifndef ASM_WEAKEN_DECL
   if (!lookup_attribute ("weak", DECL_ATTRIBUTES (decl)))
     DECL_ATTRIBUTES (decl)
       = tree_cons (get_identifier ("weak"), NULL, DECL_ATTRIBUTES (decl));
+#endif
 }

 static void


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42854

Reply via email to