[uClibc] Toolchain procedure questions...

Manuel Novoa III mjn3 at codepoet.org
Mon Jul 5 16:51:23 UTC 2004


Hello,

On Mon, Jul 05, 2004 at 05:51:36PM +0200, Nick Jennings wrote:
> Hi all, I have read several threads from people who have had trouble
> getting a grasp on the uClibc toolchain proceedure. The documentation is
> non-existent, and what is written about it just points people to the
> "auto-magical" build environments which take care of the details for you.

Because there is no documentation to speak of, other than the build
process itself as documented in the makefiles of buildroot and
toolchain.

> I've seen some hostility in regards to people who have made comments about
> the lack of documentation, and before I become another target, I'd like to

Hostility?  When?

> at least attempt to figure this out once and for all and write some real
> documentation on the subject. Even if everything is "taken care of" with
> the toolchain and/or buildroot tarballs, it does not mean people do not
> need to know how to do it by hand.

See basic description below.  As far as people needing to know how to do
it by hand, either they can follow the build system with perhaps only a
couple of questions, or they need extended hand-holding.  We generally
don't have the time or resources to support the latter... although I
suppose a support contract is an option.

> For example. I have no net connection where I am living now. I am
> travelling and just have my laptop and a USB key. I go to the internet
> cafe's and download all the code and documentation I think I'm going to
> need and so therefore the Makefiles which try to download all the source
> aren't going to work for me.

Not an issue for us, although I believe "make sources" worked at one
time.  You have the sources though, so you can fix it if it is currently
broken and post patches to the uClibc list if you desire.

> The other reason the pre-build environments, or automated build scripts
> aren't going to work for me is I want to understand fully what's going on-
> it's more of a research project than a pragmatic "this needs to get done"
> project. I'm pretty fuzzy when it comes to the details of this process and
> would like to become a bit more fluent in my understanding.

Basicly...

1) unpack uClibc and the kernel headers
2) configure uClibc
3) unpack binutils
4) apply binutils patches to add support for <arch>-linux-uclibc tuples
5) configure and build cross binutils
6) unpack gcc
7) apply gcc patches to add support for <arch>-linux-uclibc tuples,
   including the necessary patches for libstdc++ to teach it about
   uClibc ctype and locale internals
8) configure and build gcc-initial
9) build uClibc using gcc-initial
10) configure and build gcc-final... the cross gcc targeted for uClibc
11) configure and build native uClibc versions of binutils and gcc for
    the target (if desired... buildroot only)

For specifics, see the makefiles and patches.  You can also ask... but
the answer might simply be "because that's what got it working".

> I've tried to study the toolchains makefiles, but I'm no expert with the
> whole process so I can only get bits and pieces that I actually understand
> so far. I appreciate any help, and i've kept track of what process I've
> gone through already. (It took a lot of trial and error to get even this
> far). Below is as far as I've gotten.
> 
> 
> To try to get some clarification first, let me outline my understand of
> what needs to be done. Hopefully this will help to point me in the right
> direction and save me some headache if I am mistaken.
> 
> 
> 1. Build uClib with the native compiler and libraries on the system.

Uh... no.  uClibc has not been built with the native compiler in some
time.

Manuel



More information about the uClibc mailing list