[PATCH]: Fix PR42854 so weak linking works again on darwin
Jack Howarth
howarth@bromo.med.uc.edu
Sun Feb 14 18:09:00 GMT 2010
On Sun, Feb 14, 2010 at 11:00:20AM +0100, Jakub Jelinek wrote:
> On Sat, Feb 13, 2010 at 09:08:09PM -0500, Jack Howarth wrote:
> > 2010-02-13 Jack Howarth <howarth@bromo.med.uc.edu>
> >
> > PR 42854
> > * gcc/varasm.c: (declare_weak): Don't add weak attribute to
> > decl if OBJECT_FORMAT_MACHO.
> > (assemble_external): Don't restrict adding decls those with weak
> > attribute if OBJECT_FORMAT_MACHO.
>
> This is a wrong. IMNSHO you want to drop the lookup_attribute (, "weak")
> tests in code related to weak_import inside of the darwin backend, instead
> of this gross hack.
>
> Jakub
Jakub,
Your suggestion simply ignores the fact that weak linking has been
broken on darwin. I did find...
http://www.mail-archive.com/llvm-commits@cs.uiuc.edu/msg21414.html
which clearly shows that weak_imports shouldn't be blindly marked
as weak in declare_weak as now done.
Jack
More information about the Gcc-patches
mailing list