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...
Heiko Carstens wrote:> 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...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. -hpa
Heiko Carstens wrote:> 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...Just drop __clzdi2.o; it's not used by anything (__clzsi2.o is, however...) -hpa
Heiko Carstens wrote:> 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...Just drop __clzdi2.o; it's not used by anything (__clzsi2.o is, however...) -hpa
Heiko Carstens wrote:> 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...Just drop __clzdi2.o; it's not used by anything (__clzsi2.o is, however...) -hpa
Heiko Carstens wrote:> 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...Just drop __clzdi2.o; it's not used by anything (__clzsi2.o is, however...) I just pushed out 1.4.7 which does this. -hpa
Maybe Matching Threads
- klibc sparc trouble with gcc > 4.0
- (fwd) Bug#440721: FTBFS on sparc while linking usr/klibc/libc.so
- klibc 1.5.20 falls into an finite loop during build against linux 2.6.35.4
- [PATCH v2 3/5] Kbuild: use "libc.a" with clang
- [patch] Kbuild.klibc don't hardcode gcc version