[Desire Android Development] theGanymedes:
Well, the post you read was also the one I tried to work on, but it lacks quite much and quite old.

First mistake you do: you must give parameters to ./configure; rather than Make itself to make setting apply and configure correctly. Each package (program?) has its own configure parameters which you can learn by

./configure --help

Now, about compilation of GlibC...

To be honest; I personally didn't try to set every setting at configure line myself as well, just gave the parameters I know should change and I know what they're about :)

If you are to make this process for Desire, read the end of the post first.

1- PREPARATION

Like installing headers, GlibC building had to be done in a separate directory than source tree. Also you must have installed GlibC headers for your target system (whatever that is) to some folder (Instructions are available at post #110) - I'm going to refer the folder including headers as "<headers dir>", and refer the folder you're going to build at as <build dir>

a) Go to your <kernel dir> (sources) and then copy the "include" folder to your <headers dir> directory WITHOUT OVERWRITING the existing files -- NOTE THAT THIS SOURCES SHOULD BE THE SAME AS THE SOURCES THAT YOU BUILD YOUR TOOLCHAIN WITH. If you erased kernel headers folder, go to post #5 and make another one..

This copying is not compulsory, but highly advised to make things easier later on (believe me, simple copying is much more easier than giving CFLAGS parameter to every configure :) ).

NOTE THAT if your file manager didn't complain about overwriting files, it means you are merging the directories in a wrong manner - start again.. We're trying to gather all headers (glibc and kernel) in one directory here.

b) Open a terminal window and export those variables, because we're going to need them a lot:

export TARGET=arm-<whatever>-linux-gnueabi
export DESTDIR=/some/folder/you/want/files/installer
export HEADERS=<header dir> **READ BELOW

Your headers should be directly in this folder. If there is an include folder inside your <header dir>, give "<header dir>/include" as parameter here.

2- CONFIGURATION

a) CD into the <build dir> if you didn't, and write the configure line:

../glibc-<version>/configure --host="$TARGET" --with-ports="nptl, ports" --with-tls --with-headers="$HEADERS" --prefix="<wherever you want to put these libraries at your device>"

Note the prefix here. Get used to this approach, you're going to use it a lot ;) -- for example, I gave "/data" here..

3- BUILDING

a) Simply write "make" here.. You can build up this process faster by giving "-j N" parameter (N is parallel job count which is best when N=cpu core count + 2)

In any way, it's going to take some time ;)

4- INSTALLING/COPYING

a) Simply

make install install_root="$DESTDIR"

Note here is, some configurations use "install_root" whilst some use DESTDIR variable to determine where to install. We give both to them, just to be safe ;) .. Normally "./configure --help" tells you if it uses DESTDIR though..

Note that those steps are completely unnecessary if you're trying to make it for Desire - because I already prepared and created an installer zip for you (go to first post). Libraries won't simply work when you copy to some folder at your Desire (or any other device, I think) - there needs to be done some work at the phone as well (also posted those in various posts).

If you want to develop applications for Desire, this step is again UNNECESSARY because your toolchain already has GlibC installed to its folders. I've written this guide simply thinking you want to do this process to some other device...