ATARI MiNT cross-compiler for Mac OS X
Based on the latest m68k-atari-mint cross-compiler work of Vincent Rivičre (who is providing cygwin binaries on his site),
I have built the gcc cross-compiler with his patches under Mac OS 10.5 and make them available here for other Mac OS X users.
The old description on how to build the cross-compiler yourself has been moved here.
The cross-compiler must be installed into the directory /opt/cross-mint. This directory can be created using the following Terminal commands (which require administrator privileges):
sudo mkdir -p /opt/cross-mint sudo chown $USER /opt/cross-mint
After this initial setup, the binaries can be extracted (as your normal user) using the following command: (replace FILENAME with the actual filename)
tar xvzf m68k-cross-mint-bin-darwin-universal-20100127.tgz --directory /opt/
Cross-compiler binary
For simplicity only a single "all included" package m68k-cross-mint is provided here which runs on Intel and PowerPC based Apple Computers. It contains binutils 2.20, mintbin 0.3, gcc 4.4.3, pml 2.03, mintlib 0.59.0 (CVS of 23th January 2010), gemlib 0.43.6 (CVS of 27th January 2010) and cflib (CVS of 27th January 2010).
- m68k-cross-mint-bin-darwin-universal-20100127.tgz (as of 27 January 2010)
What's new in this release?
- GCC 4.4.3 (previously 4.4.2)
- relocation of the tool chain from
/usr/local/cross-mint(which is by default invisible in the Finder) to/opt/cross-mint. - No need to install additional libraries (mpfr and gmp)
- One single package for Intel and PowerPC based Macs (=Universal Binary)
Using the cross-compiler
After installation, you should create/modify your bash profile by enhancing ~/.profile with the following lines:
# m68k-atari-mint cross compiler export PATH=$PATH:/opt/cross-mint/bin export MANPATH=$MANPATH:/opt/cross-mint/share/man
This allows you to use the cross-compiler using m68k-atari-mint-gcc (or any other tool of it) and query its man pages.
The following simple "hello world" example can be compiled for TOS using the command: m68k-atari-mint-gcc hello.c -o hello.tos.
This creates a hello.tos application which can be run on an TOS compatible system (e.g. under MacAranym).
#include <stdio.h>
int main(int argc, char* argv[])
{
puts("Hello, world !");
return 0;
}