Building your own toolchain using crosstool
Note: The following Crosstool instructions work, but it may be more desirable to use crosstool-NG as Crosstool is no longer maintained. The crosstool-NG package allows for later versions of GCC to be built with earlier versions of GLIBC. This would allow, for instance, Qt 4.7 and later versions to be built from source as a compile with GCC 3.3 fails.
- Make sure you have patch, flex, and bison installed
- Download crosstool from the crosstool website
- Untar it to a directory of your choice. Just make sure the path does not contain spaces (e.g. C:\Program Files\...)
- become root and create the directory /opt/crosstool
- make that directory owned by your regular user with chown cd:users /opt/crosstool as root. Don't forget to change the username...
- Modify the script ./demo-arm-softfloat.sh to set TARBALLS_DIR=/tmp/downloads (or any other directory that resolves to something without blanks)
- (as normal user again) call ./demo-arm-softfloat.sh to start the build process
- be aware that crosstool downloads several required packages (gcc, binutils, linux-kernel, glibc) -- broadband is advised
- build takes about 30 minutes on a fairly modern machine
Note that if you are using the already patched distributions from the TomTom web site, you have to rename the corresponding patch directories in order not to try to apply the patches again. You also have to create a specific .dat file to get the right combination of tools (check http://kegel.com/crosstool/current/doc/crosstool-howto.html#data).
As a further complication, crosstools assumes that the Linux distribution has either "2.4" or "2.6" in the path name. Using the Linux distro from TomTom, this is not the case. One way to resolv this is to rename to distribution file to golinux-2.6.tar.gz and add a piece of code to getandpatch.sh, e.g. as follows:
# TomTom names the tree as golinux-tt* if [ -d golinux-tt* ]; then mv golinux-tt* $BASENAME fi
There also seems to be other complications related to using the source code from TomTom. Be warned. For example, when compiling under Mac OS X, libintl version of gettext is not installed by default, requiring one to install it (e.g. at /opt/local) and then to patch golinux*/Makefile to define and export HOST_LOADLIBES.