This page explains how to create a working cross compiler for the Zaurus under
Mac OS X. While it's fairly easy to create a cross compiler based on GCC 3.1, the
version used here is GCC 2.95.3 (which makes things more complicated). The reason
for this is that all libraries on the Zaurus, whether from Sharp or from third
parties, are compiled with GCC 2.95 and can't be used from GCC 3 based code.
This is only a pure cross compiler. To develop applications for the GUI on the
Zaurus (Qtopia), you need additional tools.
Apple's developer tools must be installed. Also,
you need the following archives to get started:
First, create the directories listed in the following table. The left column shows the
place holders used in the following explanations. The directories can be at
arbitrary locations, but they must not contain any spaces (nor must any of their
parent directories). This constraint could only be lifted by changing the
configure scripts of the GNU tools used in the process - if anybody feels
like doing this, please send me the patches :-).
Short name | Purpose |
<src-dir> | Directory where the sources will be unpacked. This directory should be
empty. |
<work-dir> | Directory where the binary cross development environment will be
installed. This directory should be empty. |
<arc-dir> | Directory with the necessary archives. |
<arc-dir> is the place where the archives listed in the previous section
are expected. If you didn't download them to a single directory (or to a
directory containing also other files), please copy them to a separate place.
You can also use symbolic links if you want.
Now download and execute this script
which works like this:
> /some/path/makecross.sh --srcdir <src-dir> --workdir <work-dir> --arcdir <arc-dir>
The script will create the cross compiler and compile a little
"Hello World" program. You can specify the directories in a relative or
absolute way. Be prepared for the script to take some time (about half an our
on my iMac G4/800). To test if everything worked you should copy the
resulting "a.out" file from <src-dir> to the Zaurus and execute it.
Necessary patches for GCC 2.95.3 (36 KB) | gcc-patches.tgz |
Script for automatic setup of the cross compiler (07/23/2003, 8 KB) | makecross.sh |
Last update: 02/16/2004
|