Image grohtml-218261.png


Image grohtml-218262.png his page briefly describes how GNU Modula-2 can be built as a cross compiler. It should not be considered as a definitive source for cross compiling, but serves to show how it can be done given the tar balls listed here. It provides a script which builds the binutils, glibc, C and Modula-2 compilers from source for the purpose of cross compiling to the strongarm processor.

The purpose of this project was to stress test the GNU Modula-2 compiler by building it as a cross compiler for an iPAQ H3850.

The tar files you need are listed here. All these tar files except gcc+gm2 and the arm headers are unmodified copies of the GNU tools. Therefore depending upon where you are you might want to download these files from a local mirror. The arm headers were taken from the linux-kernel-2.4.18 and configured for a SA1110 arm processor (the one that is in the iPAQ :-). The headers are placed here simply for convenience. Note the tool chain is large, about 60 Mbytes of compressed source.


Size Package

9.4M binutils-2.13.tar.bz2
3.6k build-all-tools
26M gm2-20020916+gcc-3.2.tar.gz
16M glibc-2.2.4.tar.gz
4.0k hello-world.tar.gz
3.5M newlib-1.10.0.tar.gz
3.6M strongarm-headers.tar.gz

To cut to the chase, download everything and examine the script build-all-tools.

It would be sensible to check the script before you run it - and perhaps use it as an install guide.

It might be a good idea to perform a dry run of the script and run the commands by hand - and only execute the make install as root. I’ve run it on my machine without a problem, but your mileage might vary. If are successful in building GNU Modula-2 as a cross compiler please would you send a brief email to the GNU Modula-2 mailing list.


Note that the maintainers of glibc say that you need gcc-2.95 series compiler to build glibc-2.2.4. We are using gcc-3.2, but we are only building a static libc with obvious consequences for large executables.

This document was produced using groff-1.22.