Hollis Blanchard <[EMAIL PROTECTED]> 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
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-grub