This text tries to explain the steps to follow to setup the necessary tools
to cross-compile m68k-atari-mint software on a different machine.
I have used the available patches from the Sparemint site, along with the original (gcc & binutils) archives.
These are the steps I followed to build these utilities. The power of recent machines are well superior to the Ataris, the compilation time for heavy software is greatly reduced, so we might as well use them.
Note: The mintlib is necessary (binaries and include files) to compile a cross-compiler. If you know how to build a cross-compiler only with sources files, please let me know.
The whole thing will be installed in a user directory, so we can compile all,
without being root. For me, tools will be installed in /home/patrice/cross-tools.
You can choose another one if you want. Don't mix tools for the native machine,
and those for cross-compilation.
We create a cross-build directory (/home/patrice/cross-build). We change dir in it to start the work (cd /home/patrice/cross-build).
tar xvzf binutils-22.214.171.124.tar.gz
This step is optional, do it only if your binutils are too old, or if you don't have them. But I recommend it. If you can not do this step, maybe you can not continue further.
mkdir binutils-126.96.36.199-host cd binutils-188.8.131.52-host ../binutils-184.108.40.206/configure --prefix=/home/patrice/cross-tools make make install cd .. rm -rf binutils-220.127.116.11-host
From now on, we must use the tools we will compile, so we add the PATH where the new tools are in front of the PATH environment variable. The same for newly build libraries (only for the host system).
export PATH=/home/patrice/cross-tools/bin:$PATH export LD_LIBRARY_PATH=/home/patrice/cross-tools/lib:$LD_LIBRARY_PATH
cd binutils-18.104.22.168 gunzip -c ../binutils-22.214.171.124-mint-2.diff.gz | patch -p1 cd .. mkdir binutils-126.96.36.199-mint cd binutils-188.8.131.52-mint ../binutils-184.108.40.206/configure --prefix=/home/patrice/cross-tools --target=m68k-atari-mint make make install cd .. rm -rf binutils-220.127.116.11-mint
tar xvzf gcc-3.3.3.tar.gz mkdir gcc-3.3.3-host cd gcc-3.3.3-host ../gcc-3.3.3/configure --prefix=/home/patrice/cross-tools --enable-languages=c++ make make install cd .. rm -rf gcc-3.3.3-host
cd gcc-3.3.3 gunzip -c ../gcc-3.3.3-mint.diff.gz | patch -p1 cd ..
tar xvzf mintlib-devel-0.57.4.tar.gz mkdir gcc-3.3.3-mint cd gcc-3.3.3-mint ../gcc-3.3.3/configure --prefix=/home/patrice/cross-tools --target=m68k-atari-mint --enable-languages=c++ --with-sysroot=/absolute/path/to/mintlib-devel-0.57.4 make make install cd ..
Note: You must give an absolute path to the mintlib-devel root directory. This mintlib-devel directory must contains a 'usr' directory with 'usr/include' and 'usr/lib' with contains the mintlib headers and libraries files. The libraries must also have the corresponding debug version ('libc_g.a' for example).
If you want to install mint libraries, you must put them, in the directory
m68k-atari-mint created in the installation directory (i.e. /home/patrice/cross-tools/m68k-atari-mint).
You find here the specific tree with bin, include, lib, and other directories.
When you want to cross-compile something for Atari, add '--prefix=/home/patrice/cross-tools/m68k-atari-mint' to the './configure' command-line.
Other necessary tools, available on Sparemint, to install: