Fri Mar 23 14:13:00 GMT 2001
John et al:
> >> If you want a linux target, then you will need to obtain glibc and
> >> build with that. If you want newlib, then I suggest you use a more
> >> appropriate cross configuration, such as plain "arm-elf".
> Given that, as you have just stated, you want to build a linux system,
> why didn't you follow the first part of his advice rather than the
> second ? I don't know if uClinux is some embedded variant, but it
> probably still needs glibc rather than newlib.
uClinux is an MMU-less Linux, albeit with tons of other changes as
well. Don't make any assumptions about one vs. the other--- they're
different enough that you need to think of them as being almost
Put another way, uClinux is *not* Linux, at least not from the
perspective of crossgcc reader.
You don't want glibc or newlib, you want uClibc--- a runtime library
written specifically for uClinux. Check Lineo's website, as they
consider themselves the "owners" (and not always in the Free sense,
IMO) of uClinux et al.
Yes, newlib-1.9.0 supports the Linux ABI, but that isn't the "uClinux"
ABI, so I don't think it will work.
> I think MontaVista (www.mvista.com or something) provides a prebuilt
> 'arm-linux' targeted toolkit and this includes the prebuilt target libs
> and headers for something possibly quite near to the uClinux. How their
> 'HardHat-Linux' differs is then another subject, but getting something
> working first could help.
Yes, MV has an arm-linux, but it isn't uClinux so it's of no use.
> I built my 'arm-linux-gnu' toolset by first compiling GCC using the copied
> glibc-headers from my 'i586-linux-gnu' machine, first replacing the links
> to the kernel headers (the 'asm' and 'linux' subdirs in 'include') to the
> right ones. Then built glibc-2.1.3 and rebuilt GCC using the installed glibc
> (to make sure the right headers were used) and then built glibc-2.2.1 as
> another glibc...
Ugh. I have no idea what you've ended up with here. :^(
When you build uClinux (or Linux for a different target, for that
matter), you're in a complete crossdevelopment environment. If you
have to touch the build platform's configuration, then something is
> So I built from scratch, but I knew all the time what I was
> doing... If things are still unclear, following the "Installation /
> Cross-Compiler" from the GCC manual, getting first the target libs
> and headers, and then building GCC using them, is the sure way...
I haven't done a uClinux build yet, but I don't think the compilers
will be "arm-linux", I think they're just "arm-elf". In any case,
they pretty much do their own thing over there--- the CrossGCC FAQ
won't be much help on this until I get some time to update it.
> Generally it sounds absurd that someone could be a novice and to be
> the first to build binutils+gcc+glibc for something called
> 'uClinux-2.4' for ARM...
You probably aren't. :^)
Unfortunately, uClinux isn't all that well documented yet.
The important parts are that you don't need binutils+gcc+glibc, you
need tools that have been (heavily) tweaked for uClinux. At the
moment, they're only available at uClinux.org or Lineo.com unless they
> Prebuilt binutils and gcc binaries aren't necessary, but the
> prebuilt glibc is... Anyone trying to build GCC for his/hers host,
> will need some target libs & headers first if not being familiar
> with building from scratch. So I would expect the 'arm-linux'
> C-library being easily available in the net...
Me myself, I *hate* prebuilt stuff. Although, I'm using RHN to manage
a few of my workstations/servers, so that's all prebuilt. But all my
crossdevelopment tools are homegrown, even installed in my own /opt
I've had an idea for a while to put together some RPMs for cross
compilers et al... anyone interested?
For the record, to build glibc you only need glibc itself and the
kernel headers for the OS you're building for, so glibc can get the OS
calls right. But again, glibc isn't intended for use with uClinux.
> The prebuilt libs can be for a wrong ARM-processor type etc., but if
> GCC can be built using them, producing glibc for just the right type
> later isn't hard... Just following the build/install instructions in
> glibc sources...
Kai is right that building glibc is kind of a pain, however. And the
instructions aren't all that clear until you've mucked it up a few
>> Why on earth complicate matters with trying to build from scratch?
> For the sheer joy and sense of discovery of learning something new?
> That's always seemed a good enough reason to try something
> complicated to me.... :)
I didn't catch the type of your build host, but you should just run
Linux if you can--- Cygwin is pretty good, but you'll find things go
*much* smoother if you run the full penguin.
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to firstname.lastname@example.org
More information about the crossgcc