Subject: Building Glibc-2.3.4 for mipsel

From: "Daniel Laird" <[email-masked]>
Date: Mon, 11 Apr 2005 16:26:08 +0000

I am trying to get Glibc-2.3.4 to build for mipsel.

I am using crosstool to help me do this
I am using 2.6.11.6 kernel
I am using 2.15.96 binutils
I am using Glibc-2.3.4
I am using 3.4.3 Gcc

I try to compile it and i get a problem in the install-headers target where 
it tries to pass -mabi=32 to a host compile.  This will obviously not work.

To get round this i comment out the offending line in 
sysdeps/mips/mips32/Makefile.

And pass in EXTRA_TARGET_CFLAGS="-mips32 -mtune=r4600"

This succesfuly builds me a toolchain and a kernel and the kernel runs on my 
target

I then try to compile BUSYBox-1.00 and it errors with a missing 
bits/syscall.h.  I check and it is correct this is missing .
I have seen some patches to do in this area and have tried them all but it 
makes no difference.

Has anyone used crosstool and GLibc-2-3-4 etc and built a tollchain where 
bits/syscall.h exists?

I think the problem may lie in my editing of the makefile before 
install-headers and then the editing it back.  But i want to know if anyone 
has done what i am trying.

Please help!!

DJL

---

From: Jim Gifford <[email-masked]>
Date: Mon, 11 Apr 2005 10:04:00 -0700

Daniel,
   I have gotten this to work, using my build method from LFS. There are 
a few patches needed, here is my information about the patches location.

http://documents.jg555.com/lfs-raq2
http://documents.jg555.com/lfs-raq2/chapter03/patches.html

The patches in particular are

http://www.linuxfromscratch.org/patches/downloads/linux-libc-headers/linux-libc-headers-2.6.11.2-mips_fix-1.patch 

This fixes a compile issue with sysklogd

http://www.linuxfromscratch.org/patches/downloads/glibc/glibc-2.3.4-mips_syscall-2.patch
Fixes various syscall issues

-- 
----
Jim Gifford
[email-masked]