New PRG/ELF toolchain with GCC 13!

Vincent Rivière's m68k-atari-mintelf cross-tools

This page is dedicated to the programmers who want to:

You will find here gcc, g++, as, ld, and other tools configured to produce executables for the Atari ST. It means that you can use all the latest C++ features, such as templates, exceptions, STL, as well as inline assembly, to build software which will run on your old Atari ST.

Original sources are provided, as well as the patches and build scripts. It would be easy to recompile them on any operating system already supporting the GNU tools.
Feel free to redistribute, recompile, and improve the packages, with respect to their own licenses.

The MiNT patches were originally written by Guido Flohr and Frank Naumann in 1998 for the FreeMiNT project. I upgraded them to newer binutils and GCC versions starting from 2007. Then I switched to the m68k-atari-mintelf target in 2023, after having designed a new PRG/ELF file format. Many C++ patches for newer GCC, as well as MiNTLib and FDLIBM improvements were added by Thorsten Otto.

Quickstart for Windows

  1. Install Cygwin by running setup-x86_64.exe. This will provide you a full UNIX-like environment necessary for running the GNU tools.
  2. Install the following packages, using the Cygwin setup program: libisl23 libmpc3
  3. Download and install cross-mintelf-cygwin-20240218-setup.exe.
  4. Now you can use any tool prefixed by m68k-atari-mintelf-, such as m68k-atari-mintelf-gcc, m68k-atari-mintelf-g++, and even read the man pages.

Everything is installed in /opt/cross-mintelf.
If you want to completely uninstall the tools, you just have to remove that directory.

Other operating systems

Individual packages

These packages can only be useful for advanced users.

Component Version Packages
binutils 2.42
GitHub repository: vinriviere/m68k-atari-mint-binutils-gdb/tree/binutils-2_42-mintelf
Original sources: binutils-2.42.tar.xz (official and faster link)
MiNT ELF patch: binutils-2.42-mintelf-20240218.patch.xz
Build script: binutils-2.42-mintelf-20240218-bin-cygwin-howto.txt
Cygwin Package: binutils-2.42-mintelf-20240218-bin-cygwin-20240218.tar.xz
MiNTBin Git-20230913
GitHub repository: freemint/mintbin
Original sources: mintbin-Git-20230913.tar.xz
Build script: mintbin-Git-20230913-bin-cygwin-howto.txt
Cygwin Package: mintbin-Git-20230913-bin-cygwin-20240211.tar.xz
GCC 13.2.0
GitHub repository: vinriviere/m68k-atari-mint-gcc/tree/gcc-13-mintelf
Original sources: gcc-13.2.0.tar.xz (official and faster link)
MiNT ELF patch: gcc-13.2.0-mintelf-20240130.patch.xz
Build script: gcc-13.2.0-mintelf-20240130-bin-cygwin-howto.txt
Cygwin Package: gcc-13.2.0-mintelf-20240130-bin-cygwin-20240210.tar.xz
MiNTLib Git-20240114
GitHub repository: freemint/mintlib
Original sources: mintlib-Git-20240114.tar.xz
Build script: mintlib-Git-20240114-bin-cygwin-howto.txt
Cygwin Package: mintlib-Git-20240114-bin-cygwin-20240211.tar.xz
FDLIBM Git-20230207
GitHub repository: freemint/fdlibm
Original sources: fdlibm-Git-20230207.tar.xz
Build script: fdlibm-Git-20230207-bin-cygwin-howto.txt
Cygwin Package: fdlibm-Git-20230207-bin-cygwin-20240211.tar.xz
GEMlib Git-20230901
GitHub repository: freemint/gemlib
Original sources: gemlib-Git-20230901.tar.xz
Build script: gemlib-Git-20230901-bin-cygwin-howto.txt
Cygwin Package: gemlib-Git-20230901-bin-cygwin-20240211.tar.xz
CF-Lib Git-20230912
GitHub repository: freemint/cflib
Original sources: cflib-Git-20230912.tar.xz
Build script: cflib-Git-20230912-bin-cygwin-howto.txt
Cygwin Package: cflib-Git-20230912-bin-cygwin-20240211.tar.xz
gemma Git-20240218
GitHub repository: freemint/gemma
Original sources: gemma-Git-20240218.tar.xz
Build script: gemma-Git-20240218-bin-cygwin-howto.txt
Cygwin Package: gemma-Git-20240218-bin-cygwin-20240218.tar.xz
LDG SVN-20230924
SVN repository: SourceForge ldg
Original sources: ldg-SVN-20230924.tar.xz
Build script: ldg-SVN-20230924-bin-cygwin-howto.txt
Cygwin Package: ldg-SVN-20230924-bin-cygwin-20240211.tar.xz
SDL 1.2-Git-20231221
GitHub repository: libsdl-org/SDL-1.2
Original sources: sdl-1.2-Git-20231221.tar.xz
Build script: sdl-1.2-Git-20231221-bin-cygwin-howto.txt
Cygwin Package: sdl-1.2-Git-20231221-bin-cygwin-20240211.tar.xz
ncurses 6.4
Original sources: ncurses-6.4.tar.gz
MiNT ELF patch: ncurses-6.4-mintelf-20230910.patch.xz
Build script: ncurses-6.4-mintelf-20230910-bin-cygwin-howto.txt
Cygwin Package: ncurses-6.4-mintelf-20230910-bin-cygwin-20240211.tar.xz
Readline 8.2
Original sources: readline-8.2.tar.gz
Build script: readline-8.2-bin-cygwin-howto.txt
Cygwin Package: readline-8.2-bin-cygwin-20240210.tar.xz
OpenSSL 3.2.1
GitHub repository: vinriviere/openssl
Original sources: openssl-3.2.1.tar.gz
MiNT ELF patch: openssl-3.2.1-mintelf-20240209.patch.xz
Build script: openssl-3.2.1-mintelf-20240209-bin-cygwin-howto.txt
Cygwin Package: openssl-3.2.1-mintelf-20240209-bin-cygwin-20240211.tar.xz
zlib 1.3.1
Original sources: zlib-1.3.1.tar.gz
Build script: zlib-1.3.1-bin-cygwin-howto.txt
Cygwin Package: zlib-1.3.1-bin-cygwin-20240210.tar.xz
Zstandard 1.5.5
Original sources: zstd-1.5.5.tar.gz
Build script: zstd-1.5.5-bin-cygwin-howto.txt
Cygwin Package: zstd-1.5.5-bin-cygwin-20240211.tar.xz
GMP 6.3.0
Original sources: gmp-6.3.0.tar.xz
Build script: gmp-6.3.0-bin-cygwin-howto.txt
Cygwin Package: gmp-6.3.0-bin-cygwin-20240211.tar.xz
MPFR 4.2.1
Original sources: mpfr-4.2.1.tar.xz
Build script: mpfr-4.2.1-bin-cygwin-howto.txt
Cygwin Package: mpfr-4.2.1-bin-cygwin-20240211.tar.xz
Expat 2.6.0
Original sources: expat-2.6.0.tar.xz
Build script: expat-2.6.0-bin-cygwin-howto.txt
Cygwin Package: expat-2.6.0-bin-cygwin-20240211.tar.xz
pkgconf 1
Build script: pkgconf-1-bin-cygwin-howto.txt
Cygwin Package: pkgconf-1-bin-cygwin-20240211.tar.xz
cygwin-setup 20240218
GitHub repository: vinriviere/cross-mint-cygwin-setup/tree/mintelf
Sources: cross-mintelf-cygwin-20240218-setup-src.zip
Binary: cross-mintelf-cygwin-20240218-setup.exe

Packages history is available here.

More information

This toolchain is still experimental, however everything should work fine. Just use m68k-atari-mintelf-gcc and so on. I've successfully compiled and tested a bunch of FreeMiNT software using this toolchain: this is the proof that it's reliable.

Important: This toolchain, like other ELF toolchains, doesn't use the "leading unserscore". This means that if you mix C and assembly language, a C variable named myvar will appear with the same name myvar in assembly code (not _myvar, unlike older toolchains). The __USER_LABEL_PREFIX__ define is set to nothing on ELF compilers (while it was set to '_' on older compilers).

The -Wl,--traditional-format option isn't available yet. The symbols can't be loaded in old debuggers such as MonST2.

You can use GDB on a FreeMiNT environment to debug the programs built using this toolchain. Just add the -g option to the gcc command line when compiling and linking.

Some libraries use pkg-config to describe the required flags for their usage. Use the m68k-atari-mintelf-pkg-config tool for usage with the cross-compiler. You can use the --list-all option to see all the supported libraries.

If you use a custom startup code and gcc -nostartfiles, you must define a global label named _start at the beginning. This will ensure that your startup code is properly set as entry point. If you don't do that, your program may not work, and you will get a linker warning: warning: cannot find entry symbol _start; defaulting to 000000a0.


This software is freely provided by Vincent Rivière. There is no warranty of any kind.

Back to the software page