[klibc] __builtin_clz in klibc

Heiko Carstens heiko.carstens at de.ibm.com
Mon Jun 26 12:33:27 PDT 2006


Hi,

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...



More information about the klibc mailing list