bug-glibc
[Top][All Lists]
Advanced

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

glibc 2.2.4 on the mpc860 cpu


From: Axel Kittenberger
Subject: glibc 2.2.4 on the mpc860 cpu
Date: Fri, 11 Jan 2002 09:42:46 +0100

Hi!

I just cross-compiled glibc 2.2.4 for the powerpc mpc860. I think I'll report 
what problems I ran across and how I worked them around, maybe helping to 
improve a little coming glibc releases. It are most dirty fixes, maybe not 
suited for the mainline like this, but they provide some hints.

The file sysdeps/powerpc/fclrexcept.c seems to contain floating point 
operations, as the 860 doesn't have a FPU and failed to compile when 
configured with --without-fp I moved it to sysdeps/powerpc/fpu/fclrexcept.c

In sysdeps/powerpc/Makefile I commented out line 7
ifeq ($(subdir),math)
# libm-support += fenv_const fe_nomask
endif
as they also inherit some FPU stuff.

sysdeps/powerpc/memset.S is broken! That was a bitch to find as my new ld.so 
constantly crashed. I approximated the error with debug outputs in ld.so. One 
cannot run ld.so in gdb(server), or can I? After searching on the web 
afterwards it seems to be a well known problem, memset.S assumes a 32 byte 
cache line, but the little mpc has just 16 bytes. Simple fix was of course 
just to delete it. Don't know how this problem can be cleanly solved, but I 
think resetting memory by using advantage of the cash line is rendered 
unusable because the routine can't know how big it is. Still the "normal" 
assembler memset might be quite faster than the generic c one. Another 
possibilty would be to define a macro when compiled with --with-cpu=860 to 
define the cache line to 16. (In the archives the problem seems to be the 
same but the other way around as the power3 cpu seems to have a 64 byte 
cacheline)

I've configured glibc with the prefix=/usr as this is the destination on the 
target. However for the cross-compiler I installed it otherwhere by specifing 
a installroot like /usr/local/cross (of course, since I want to keep my glibc 
for the x86 on my host machine :o)) 
However the created file /usr/local/cross/usr/lib/libc.so contains a link to 
/lib/libc.so.6 beeing the libc of my host not the target. Since the 
crosscompiler stumbles over this when trying to link an application, I hand 
edited the file to point to the target glibc /usr/local/cross/lib/libc.so.6

- Axel



reply via email to

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