m68k-atari-mint cross-tools

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.

The original sources are provided, as well as the patches and the 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.


Quickstart for Windows

  1. Install Cygwin 32-bit. 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: libmpc3.
  3. Download and install m68k-atari-mint-base-20171014-cygwin32.tar.xz (~50 MB).
  4. Now you can use any tool prefixed by m68k-atari-mint-, such as m68k-atari-mint-gcc, m68k-atari-mint-g++, and even read the man pages.

Alternatively, you can also use MinGW:

  1. Install MSYS2/MinGW.
  2. From the list below, install the mingw packages for at least
    1. binutils
    2. gcc
    3. mintlib
    4. pml
    5. gemlib

Note: the binutils and gcc packages where built with a prefix of /mingw32. If you are using an older installation using MSYS from mingw.org you should extract them by using
tar -C /mingw --strip-components=1 -xf <archive>

 

The linux packages were built on openSUSE tumbleweed (kernel 4.13, glibc 2.26). They should work on other linux distros too, but will require at least glibc 2.14.

 

The cygwin packages where built on a recent system (cygwin dll 2.9.0). Should there be problems, you may have to upgrade your version, or recompile it yourself.

 

The macOS packages where built on macOS Sierra, with a deployment target of 10.6 (Snow Leopard).

 

Everything is installed in /usr/m68k-atari-mint and /usr/lib/gcc/m68k-atari-mint.
If you want to completely uninstall the tools, you just have to remove these directories.

 

Note: On cygwin, sometimes tar fails to extract symlinks. Although cygwin supports symlinks on a NTFS filesystem, that filesystem cannot create links to non-existant files. Depending on wether the original file or link appears first in the archive, that might fail. Just extracting the same archive again should fix that.

 

Basic packages

Some of the build scripts use a script with common functions, which is available here.

 

Component Version Packages Comments
binutils
2.29.1
20171011
GitHub repository:
Original sources:
MiNT patch:
Build script:
Documentation:
CygwinCygwin Package:
CygwinCygwin Package:
MinGWMinGW Package:
LinuxLinux Package:
MacOSXMacOSX Package:
The binutils are a collection of low-level language tools.
The full documentation can be found here.
GCC
4.6.4
20170518
GitHub repository:
Original sources:
MiNT patch:
Build script:
Documentation:
CygwinCygwin Package:
CygwinCygwin Package:
MinGWMinGW Package:
LinuxLinux Package:
MacOSXMacOSX Package:
m68k-atari-mint-gcc is the C compiler.
m68k-atari-mint-g++ is the C++ compiler.
They just work. I only tested the C and C++ languages, but other languages may work, too.
If you want to generate DRI symbols in the final executable, append the option -Wl,--traditional-format to inform the linker.
I configured this version to generate 68000 code by default, and I enabled multilib. By default, sizeof(int) == 4, but if you compile with -mshort then sizeof(int) == 2 (unsupported by the current MiNTLib). Every object file and every library must be compiled with the same option! You can also generate code for the 68020 and higher and for the FPU by using the -m68020-60 option. And you can generate code for ColdFire V4e processors by using the -mcpu=5475 option.
The full documentation can be found here.
GCC contains everything to compile C programs, except a standard library and a math library.
GCC
7.2.0
20171006
GitHub repository:
Original sources:
MiNT patch:
Build script:
Documentation:
CygwinCygwin Package:
CygwinCygwin Package:
MinGWMinGW Package:
LinuxLinux Package:
MacOSXMacOSX Package:
This is the currently most recent official version GCC. It comes in two flavours: one for a.out toolchain (as the previously used version 4.6.4), and one for an elf toolchain. Elf toolchain here means that it will still produce the same executable format, but works with elf object files. To support this better, all libraries offered here were also recompiled using this format (although it is theoretically should be possible to mix them).
MiNTBin
0.3
20171006
GitHub repository:
Original sources:
Build script:
CygwinCygwin Package:
CygwinCygwin Package:
MinGWMinGW Package:
LinuxLinux Package:
MacOSXMacOSX Package:
MiNTBin has been written by Guido Flohr. It is a set of tools for manipulating the MiNT executables generated by ld. They are a complement to the binutils. The main tools are stack for setting the stack size of an executable, and flags for setting the header flags.

Library packages

Note that these packages only contain atari/mint specific files, so there is only one package of them for all host systems. They have all been built and packaged on linux though (with a prefix of /usr), so to install them for eg. MinGW you should unpack them using
tar -C <your-install-dir> --strip-components=1 -xf <archive>.

All of these libraries have been compiled with gcc 7.2, but they can be used with other versions, too. Also, they all have been compiled also for the elf toolchain. Of these, most where compiled with -flto (link-time-optimization), a feature that is not available for a.out libraries. For some (notably mintlib) this is not yet possible.

 

For packages that also build binaries, the *-dev packages will have executables in <sys-root>/usr/bin that where compiled for 68k. For native installation, there will also be *-bin packages for other machines.

 

Component Version Packages Comments
MiNTLib
0.60.1
20171006
GitHub repository:
Original sources:
Build script:
Devel Package:
MiNTLib is a standard C library. It allows to build software which runs on MiNT and TOS operating systems. Unlike other packages, I used the latest sources from the CVS repository instead of the latest official release.
PML
2.03
20171006
GitHub repository:
Original sources:
MiNT patch:
Build script:
Devel Package:
PML stands for Portable Math Library.
It works, but of course it is really slow on a 68000 without FPU.
GEMlib
0.44.0
20171006
GitHub repository:
Original sources:
Build script:
Devel Package:
The GEMlib allows to write graphical programs using GEM.
It is maintained by Arnaud Bercegeay, the official releases are available on the GEMlib's homepage. However, the latest sources are available on the FreeMiNT's GitHub repository.
CFLIB
21
20171006
GitHub repository:
Original sources:
Build script:
Devel Package:
CFLIB is Christian Felsch's GEM utility library. It provide advanced controls, such as check boxes, radio buttons, combo boxes... It also allows windowed dialogs.
BUG: On plain TOS, the CFLIB makes intensive usage of the GEM USERDEF feature. Due to bad GEM design, USERDEF callbacks are called in supervisor mode using the very small internal AES stack. Unfortunately, some GemLib functions such as v_gtext() needs an insane amout of stack (more than 2 KB). So some USERDEF callbacks quickly produces an AES internal stack overflow, and crashes all the system.
Concretely, due to this issue, programs using the CFLIB work fine on XaAES and TOS 4.04, but crashes on TOS 1.62 and EmuTOS.
gemma
git
20171006
GitHub repository:
Original sources:
Build script:
Devel Package:
Gemma is a support library for GEM application programs.
zlib
1.2.11
20171006
Original sources:
MiNT patch:
Build script:
Devel Package:
zlib is a compression library implementing the Deflate algorithm, used by gzip and PKZIP.
libpng
1.6.34
Original sources:
MiNT patch:
Build script:
Devel Package:
Portable Network Graphics
An Open, Extensible Image Format with Lossless Compression
bzip2
1.0.6
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.
LDG
svn-20171014
Original sources:
MiNT patch:
Build script:
Devel Package:
LDG stands for Gem Dynamical Libraries (actually Librairies Dynamiques GEM in french). It's a system allowing GEM applications to load and to share externals modules.
Only the libraries are compiled. To use modules, you also have to install the auto folder programs from http://ldg.sourceforge.net/.
WinDom
2.0.1
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
Windom is a C library to make GEM programming very easy. With the help of windom, you can focus on programming the real job of your application, and let windom handle complex and "automatic" GEM stuff (toolbar, forms, menu in windows...).
SDL
1.2.15-hg
Original sources:
MiNT patch:
Build script:
Devel Package:
SDL is the Simple DirectMedia Layer library. It is a low-level and cross-platform library for building games or similar programs.
Thanks to Patrice Mandin, SDL is available on Atari platforms. SDL programs can run either in full screen or in a GEM window, depending on the SDL_VIDEODRIVER environment variable.
ncurses
6.0
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
Ncurses is a library which allows building full-screen text mode programs, such as vim, less, or the GDB text UI.
readline
7.0
Original sources:
MiNT patch:
Build script:
Devel Package:
The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.
OpenSSL
1.0.2l
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
arc
5.21p
Original sources:
MiNT patch:
Build script:
Binary Package:
ARC is used to create and maintain file archives. An archive is a group of files collected together into one file in such a way that the individual files may be recovered intact.
arj
3.10.22
Original sources:
MiNT patch:
Build script:
Binary Package:
A portable version of the ARJ archiver, available for a growing number of DOS-like and UNIX-like platforms on a variety of architectures.
lha
1.14i-ac20050924p1
Original sources:
MiNT patch:
Build script:
Binary Package:
LHa for UNIX - Note: This software is licensed under the ORIGINAL LICENSE. It is written in man/lha.n in Japanese
xz
5.2.3
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
XZ Utils is free general-purpose data compression software with a high compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
zip
3.0
Original sources:
MiNT patch:
Build script:
Binary Package:
Zip is a compression and file packaging utility. It is compatible with PKZIP(tm) 2.04g (Phil Katz ZIP) for MS-DOS systems.
unzip
6.0
Original sources:
MiNT patch:
Build script:
Binary Package:
UnZip is an extraction utility for archives compressed in .zip format (known as "zip files"). Although highly compatible both with PKWARE's PKZIP(tm) and PKUNZIP utilities for MS-DOS and with Info-ZIP's own Zip program, our primary objectives have been portability and non-MS-DOS functionality. This version can also extract encrypted archives.
zoo
2-10-1
Original sources:
MiNT patch:
Build script:
Binary Package:
Zoo is a packer based on the Lempel-Ziv algorithm. Lots of files on DOS/AmigaDOS and TOS systems used this packer for their archives. The compression rate of gzip is not reached, and thus zoo should only be used for decompressing old archives.
gmp
6.1.2
Original sources:
MiNT patch:
Build script:
Devel Package:
A library for calculating huge numbers (integer and floating point).
mpfr
3.1.6
Original sources:
MiNT patch:
Build script:
Devel Package:
The MPFR library is a C library for multiple-precision floating-point computations with exact rounding (also called correct rounding). It is based on the GMP multiple-precision library.
mpc
1.0.3
Original sources:
MiNT patch:
Build script:
Devel Package:
MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as MPFR.
tar
1.29
Original sources:
MiNT patch:
Build script:
Binary Package:
GNU Tar is an archiver program. It is used to create and manipulate files that are actually collections of many other files; the program provides users with an organized and systematic method of controlling a large amount of data. Despite its name, that is an acronym of "tape archiver", GNU Tar is able to direct its output to any available devices, files or other programs, it may as well access remote devices or files.
libiconv
1.15
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
libiconv library provides an iconv() implementation, for use on systems which don't have one, or whose implementation cannot convert from/to Unicode.
M4
1.4.18
Original sources:
MiNT patch:
Build script:
Binary Package:
GNU m4 is an implementation of the traditional Unix macro processor.
flex
2.6.4
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
FLEX is a tool for generating scanners: programs that recognize lexical patterns in text.
bison
3.0.4
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
Bison is a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables. As an experimental feature, Bison can also generate IELR(1) or canonical LR(1) parser tables. Once you are proficient with Bison, you can use it to develop a wide range of language parsers, from those used in simple desk calculators to complex programming languages.
expat
2.2.4
Original sources:
MiNT patch:
Build script:
Devel Package:
Binary Package:
Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags).

Changelog

More information

See Vincent Rivière's site for a history of his packages.

Feel free to send me your comments!

Thorsten Otto

Links

Vincent Rivière has made similar scripts available for several years. His work is available here.

Patrice Mandin has made a lot of work for porting GCC and the binutils to the MiNT platform. His work is available here.

Olivier Landemarre has made its own port of GCC 4.2 to the the MiNT platform. He also has a great list of Atari-related stuff.

François Le Coat is the author of the ATARI Search Engine.

Thomas Huth is the author of the Hatari ST emulator. He has sucessfully recompiled this GCC port on Linux, on his PowerMac G4, and has successfully compiled EmuTOS with it!

Keith Scroggins has ported ScummVM to MiNT. Build instructions are available here. He has also made his own native port of GCC 4.0.1 several years before me, his work is available here.

Miro Kropáček has compiled the GCC 4.6.4 port for the MiNT host. That means you can run the latest GCC natively on your Atari/MiNT computer, without cross-compilation! He also made a nice Makefile for building all the toolchain. His work is available here.

Paweł Góralski has ported REminiscence to Falcon using this compiler. It is an interpreter for Delphine Software games, enabling to play Flashback on Falcon. He also maintains the Bus Error Wiki with a lot of programming tricks using these cross-tools.

Mark Duckworth has built an RPM package for native MiNT binutils, using the patch available on this page. He has compiled natively a lot of other RPM packages, his work is available here.

Dominique Béréziat has written a tutorial for cross-compiling GEM applications.

Philipp Donzé has built the binaries of an older version of these cross-tools for MacOS X (Intel and PowerPC supported). His binaries as well as installation instructions are available here.

Rolf Hemmerling has a nice page about the current Atari resources on the web.

DML has a nice page about Atari and engineering.

Peter Dassow has a nice page with a lot of links to ST software.

George Nakos used the cross-tools for his raptorBASIC+.

Jookie uses the cross-tools for developing CosmosEx software. CosmosEx is a hardware extension as small as a floppy drive which brings SD-Card, USB, Ethernet and much more to Atari computers.


Last updated:


Home