This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Glibc on ppc built on i386
- To: libc-alpha@cygnus.com
- Subject: Glibc on ppc built on i386
- From: Kenneth Johansson <erakeon@kieray1.p.y.ki.era.ericsson.se>
- Date: Thu, 26 Nov 1998 13:12:02 +0100
Hi Iam trying to make my own glibc that uses softfloat and no inline
assembler(FPU) for PPC. As I don't have an ppc machine I can use I must make the
library on a intel machine.
I have a few questions.
1. have anyone done a cross compiled version of glibc and got it to work
2. prefix and make install? In short how do I get an directory structure that
I just can copy from my make machine to the target. A lot of path seams to be
compiled into the files. I guess I could do the make with prefix=/ and copy out
the libs by hand but I suspect it's possible to do it smarter. A few places I
looked at is. "install_root" "libdir" "slibdir" but Iam not sure how al relate
and testing is a little slow.
4. I needed to set CC and BUILD_CC even if the documentation don't mention it
anymore. I know I put the error in a file somewhere but now I cant find it. well
I get back on this one.
5. Well it dose not work :( I attached a file with the output I get when
trying to run a hello world program I made. I don't think I can run gdb as my
CPU don't have a FPU and I am using lincppc on it at this point.
If someone out there with a ppc system wants to test my changes in
sysdeps/powerpc to see if it still works for an FPU I'm happy to mail the
changes. Its not that large and if it can be verified to work maybe it could go
in before the real release that's apparently close now. It was one file that I
was very unsure of called Versions. As it contained references to FPU stuff I
moved it into fpu but I did not get the function its supposed to do.
funny notes.
The build gets surprisingly far even when the build and host is switched so far
that its no longer obvious what's happened.
bash# strace ./ld.so.1 --library-path /swb/local/lib /bin/hej
execve("./ld.so.1", ["./ld.so.1", "--library-path", "/swb/local/lib", "/bin/hej"], [/* 9 vars */]) = 0
getuid() = 0
getgid() = 0
geteuid() = 0
getegid() = 0
brk(0) = 0x8056b44
brk(0x8057b44) = 0x8057b44
open("/bin/hej", O_RDONLY) = 3
getpid() = 17
write(2, "00017:\t", 700017: ) = 7
write(2, "file=", 5file=) = 5
write(2, "/bin/hej", 8/bin/hej) = 8
write(2, "; generating link map\n", 23; generating link map
) = 23
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
mmap(0x7ffff7f8, 0, PROT_NONE, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|0x1860640, 25560692, 0x1860000) = 0x1800000
mmap(0x7ffff7f8, 0, PROT_NONE, 0x4 /* MAP_??? */|MAP_FIXED|MAP_ANONYMOUS|0x1860640, 25560692, 0x1860000) = 0x1840000
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
bash#