bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PPC link error (memset with -fno-builtin)


From: Hollis Blanchard
Subject: PPC link error (memset with -fno-builtin)
Date: Tue, 24 Aug 2004 14:35:39 -0500

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'

The lines in question are these:
588: struct grub_hfs_catalog_key key = {0, grub_cpu_to_be32 (dir), 0, ""};
        728:    char fname[32] = { 0 };
gcc is turning these into memset calls, despite the fact that this object was built with -fno-builtin.

http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Standards.html#Standards says "Most of the compiler support routines used by GCC are present in libgcc, but there are a few exceptions. GCC requires the freestanding environment provide memcpy, memmove, memset and memcmp." I think that means that grub_memset() etc will have to become plain memset()...

$ gcc -v
Reading specs from /usr/lib/gcc-lib/ppc-yellowdog-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=ppc-yellowdog-linux
Thread model: posix
gcc version 3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a)

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]