building glibc

Submitted by Anonymous
on July 15, 2007 - 9:16am

I am building linux kernel and C library for a embedded system. My aim is to -

build linux kernel (2.6.X)
build glibc
build busybox

I have done all these and successfully booted on my PC. I built only Linux kernel and busybox. And used existing(on my PC) /lib/libc.X.Y. It worked fine.

I want to do same for the embedded system which has x86 arch. So I want to build everything for the target arch i386. But on my machine everything is being built for target i586. Doing this for linux kernel is easy, this can be done by make config.

What is quickest way to build glibc for i386 on my machine which is i586.
I have followed "cross Linux from scratch" but unable to do this because getting compiler error while bulding glibc. Does anyone provide prebuilt toolchain for i386??

Not working.. I downloaded

Anonymous (not verified)
on
July 18, 2007 - 5:05am

Not working.. I downloaded the glibc and building without giving target arch (on i686 machine) then is is working fine.. When I give target arch as i386 then geting lots of compiler errors. Some of the compiler(and make) errors are -

Redefinition of some functions
No rule to build some target (some file missing as make target needs)
errors on some inline assembly ( __asm__ )

It seems that I cant build it for i386. Has somebody has built latest glibc for i386 ?

From what I remember, you

Loris Cuoghi (not verified)
on
July 18, 2007 - 7:48am

From what I remember, you can't compile specifically for i386 anymore, just i486 and others, or generic x86 target. Do I remember correctly?

need kernel i486 emulation

on
July 18, 2007 - 3:44pm

ok, the FAQ was old an misleading :(

http://people.debian.org/~joey/pr/3.1/i386.html

(in short: you can't build glibc for i386, you have to have your kernel emulate some i486 instructions instead)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.