[Desire Android Development] theGanymedes:
First thing is first, thanks for your interest in this topic from the start. Well, I'm not cross-compilation master, but will try to help.

Cloog/PPL, I think, fails by ct-ng when you're making the toolchain because there is no decend (full-fledged) compiler yet. But now you have one, you can compile those libraries too. You've got to download their source code first (most of the times writing the package name in google does lead you to the developer's website where you can download the source). After this, you've got to compile like compiling GlibC.

I cannot help much about the configuration parameters - these do change by package. However, ./configure --help does give you the parameters that you should specify.

If you're to compile a lot of stuff, like I do, I recommend you to make some changes in your system like I did. For instance, let me tell you what I've done:

1- Made a directory called "data" at my home dir. then symlink'ed it to the root file system as /data . To do that:

cd ~; mkdir data; sudo ln -s ~/data /data;

2- Since now I've a "data" directory in my root fs, when I don't use DESTDIR in "make install", all the packages will be installed to here. Note that, you shall use this folder solely for compiling other applications, for their dependencies. You can push these files to your device too, but that'd be messy than using "make install DESTDIR=<blabla>" to seperate packages (see "how to compile from source" guide I wrote at the DEV section for use of DESTDIR) and trim them (like erasing static libraries (.a extention ones), which are not used by applications directly).

3- Now, for since we're using a "non-standard" directory for our cross-compiled packages, we have to give our GCC where to find those packages when they're needed, so that it doesn't try to use "native" libraries. In order to do that, change CC and CXX flags (CC keeps the compiler for C to use, while CXX keeps the compiler for C++) at the beginning of the configuration of package; like this:

CC="arm-msm-linux-gnueabi-gcc [B]-isystem/data/include -L/data/lib[/B]" CXX="arm-msm-linux-gnueabi-g++ [B]-isystem/data/include -L/data/lib[/B]" ./configure --prefix=/data --host=arm-msm-linux-gnueabi <other flags>

** Instead of doing this everytime, you can use a "wrapper script" for your gcc binary as well. To achieve this,

1- Go to you cross-toolchain folder (~/x-tools/arm-msm-linux-gnueabi/bin) and then rename the "arm-msm-linux-gnueabi-gcc" file to something - like "cross-gcc".

2- Create an empty file named "arm-msm-linux-gnueabi-gcc" and then edit it with a text editor (like gedit)

3- Write the following in it:

#!/bin/bash
cross-gcc -isystem/data/include -L/data/lib "$@"

This script will make sure you always pass the places of needed libraries and headers of your cross-compiled stuff to the compiler. Do the same for the g++ compiler (use arm-msm-linux-gnueabi-g++ for that.)

4- Start compiling the stuff! Note that, you still need to compile every application that is needed - it's like reinventing the whell; but in different language. Is it boring? Sometimes, but you have no other option I know of :)

5- Now, since you give the --prefix=/data option to every stuff you compile, when you invoke "make install" it shall install to /data folder, which is a symlink to your ~/data folder; ergo you make all the new stuff available for the new packages as well.

Note that, we give -isystem to the compiler, not -I - it's because -I have precedence over system directories and this sometimes causes strange errors in compilation of packages, just because a header with the same name does exist in /data/include (wrong header files are being used, you see), so we use -isystem to treat /data/include like /usr/include (a system header repo ;) )

Shortly: No, recompiling the toolchain won't fix your "relocation" problem. That was caused because you didn't make a "special folder" ("/data" in our case) which keeps your "cross-compiled" versions of your stuff; and the compiler tried to use native ones; because they were the ones it could find. Note that this may cause because you didn't compile a necessary (depended) package before.

-> Why /data?

It's because I just don't want to reconfigure every package! I keep the cross-compiled stuff at /data in my phone (and also distribute that way) and it's why I made the folder in my pc the same... Can I make it different? Yes, you can, but you have to reconfigure the packages with two different "prefix'es" this time. Definitely unnecessary effort :)