[klibc] __builtin_clz in klibc
H. Peter Anvin
hpa at zytor.com
Mon Jun 26 12:43:28 PDT 2006
Heiko Carstens wrote:
> I just got a bug report that klibc doesn't compile on s390:
> KLIBCCC usr/klibc/libgcc/__clzsi2.o
> KLIBCCC usr/klibc/libgcc/__clzdi2.o
> usr/klibc/libgcc/__clzdi2.c: In function `__clzdi2':
> usr/klibc/libgcc/__clzdi2.c:24: warning: implicit declaration of function `__builtin_clz'
> This looks like a common problem, because __builtin_clz is available since
> gcc 3.4, while the kernel should compile even with gcc 3.2.
> Looks like counting the zero bits should be done differently...
That's a warning, though, and shouldn't keep anything from compiling, so
if that happens there is problem elsewhere.
__clzdi2 isn't actually needed by klibc itself (it uses __clzsi2, but
not __clzdi2), so simply removing __clzdi2.o from the list of modules
should take care of the problme.
More information about the klibc