[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PPC link error (memset with -fno-builtin)
From: |
metgerards |
Subject: |
Re: PPC link error (memset with -fno-builtin) |
Date: |
25 Aug 2004 10:56:56 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Hollis Blanchard <address@hidden> writes:
> On Aug 24, 2004, at 2:35 PM, Hollis Blanchard wrote:
>
> > I just tried to build grub2 from cvs on PPC and got this error:
> > grubof-fs_hfs.o(.text+0xbc4): In function `grub_hfs_iterate_dir':
> > fs/hfs.c:588: undefined reference to `memset'
> > grubof-fs_hfs.o(.text+0xe74): In function `dir_hook':
> > fs/hfs.c:728: undefined reference to `memset'
>
> Reading just a little closer... this seems to do the trick:
Thanks for your report.
> +/* GCC emits references to memset() for struct initialization etc. */
> +void *memset (void *s, int c, grub_size_t n)
> + __attribute__ ((alias ("grub_memset")));
This is the same what is done for memcpy so I assume this is correct.
In your previous email you mentioned memmove and memcmp as well, I
think we need those too eventually.
Okuji, can I check this in and fix memmove and memcmp as well?
The GCC manual says about the alias attribute "Not all target machines
support this attribute". If this is a problem we should consider
adding the functions and make them call the functions with the grub_
prefixes.
Thanks,
Marco