|
Rockbox mail archiveSubject: Re: How to build firmware and other issuesRe: How to build firmware and other issues
From: Paul Suade <paul.suade_at_laposte.net>
Date: Sat, 22 Jun 2002 11:01:55 +0200 > > 2. _memcmp could not be resolved so I had to add -lc to linker options in > > apps > > Oh? What uses memcmp()? We should not rely on any external libc-like library > (we've recently worked hard to remove the newlib dependency) so if we need > memcmp() we should provide our own. Just a precision, gcc for IA32 target have builtin counterparts of standard strings operations (__builtin_strcpy, __builtin_strcmp, etc.) and memory operations (__builtin_memcpy, __builtin_memset, etc.). But when using gcc 2.95.x for SH target, I was never able to use builtin versions (the advantage of the builtin versions is that gcc can optimize them at compile-time). Maybe gcc 3.1 for SH target enables most of them. I think you'd better to use string.h for SH target (can be found in linux source) if you really want a good code (SH has a "cmp.str" instruction which compares 4 bytes at once - especially good to find a '\0' for example). The option to disable the builtin counterpart is, if I remember well, "-nobuiltin(s)", or somethink like that. Received on 2002-06-22 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |