HOWTO

Development tools

Build an Atari cross-compiler for Linux

gcc 3.3 and binutils 2.13.2.1

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.

Etape 1: Get the necessary archives

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).

Etape 2: Build and install the binutils for m68k-atari-mint (sources: 60Mb, compilation: 9 Mb)

tar xvzf binutils-2.13.2.1.tar.gz
cd binutils-2.13.2.1
gunzip -c ../binutils-2.13.2.1-mint-2.diff.gz | patch -p1
cd ..
mkdir binutils-2.13.2.1-mint
cd binutils-2.13.2.1-mint
../binutils-2.13.2.1/configure
  --prefix=/home/patrice/cross-tools
  --target=m68k-atari-mint
make
make install
cd ..

You can now remove both binutils-2.13.2.1 and binutils-2.13.2.1-mint directories.

Etape 2: Compile et install gcc for the host (sources: 148Mb, compilation: 93Mb)

tar xvzf gcc-3.3.tar.gz
mkdir gcc-3.3-linux
cd gcc-3.3-linux
../gcc-3.3/configure
  --prefix=/home/patrice/cross-tools
  --enable-languages=c++
make bootstrap
make install
cd ..

You can now remove the gcc-3.3-linux directory.

Etape 3: Patch gcc for MiNT

cd gcc-3.3
gunzip -c ../gcc-3.3-mint.diff.gz | patch -p1
cd libstdc++-v3
autoconf
cd ../..

Etape 4: Compile gcc for MiNT (compilation: 66Mb)

Note: We must use the new gcc from the previous step, so we modify the PATH variable accordingly.
tar xvzf mintlib-devel-0.53.2.tar.gz
mkdir gcc-3.3-mint
cd gcc-3.3-mint
PATH=/home/patrice/cross-tools/bin:$PATH ../gcc-3.3/configure
  --prefix=/home/patrice/cross-tools
  --target=m68k-atari-mint
  --enable-languages=c++
  --with-headers=../mintlib-devel-0.57.3/include
  --with-libs=../mintlib-devel-0.57.3/lib
make bootstrap
make install
cd ..

Etape 5: Test cross-compilation

Other necessary tools, available on Sparemint, to install:

News
Personnal productions
Patches
Ports
Projects
HOW-TOs
Development tools
Create a patch for binutils (binutils 2.16.1)
Create a patch for gcc (gcc 3.3.6, C language only)
Create a patch for gcc (gcc 3.3.6, C++ language)
Misc stuff

HTML 4.0 valide ! La montée de Pikes Peak Non aux brevets logiciels Nectarine demoscene radio
Write me to pmandin(at)caramail(point)com
(Address modified for spam protection)