[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] gcc 4.4.0 cross compiler for Apple Mac (Intel)



Hi!

Although I originally wanted to avoid it, I decided to compile a new toolchain (cross compiller) for Atari development on a Mac. I actually used sources, patches and instructions from Vincent Riviere (http://vincent.riviere.free.fr/soft/m68k-atari-mint/). The instructions work nearly perfect for an Apple machine (OSX 10.5.6)! Many thanks for that.

I had the following (small) problems during build:

binutils:

./binutils-2.19.1-mint-20090214.obj/ld/em68kmint.c

This seems to be a generated file (I did not further investigate where it comes from), but there seems to be a 

#include "getopt.h"

missing.
After adding this, everything compiled smoothly. I only needed to change the tar options at the very end of the provided "pseudo" script:

tar --owner root --group wheel -jcvf $PACKAGENAME$VERSION$VERSIONPATCH$VERSIONBUILD.tar.bz2 $INSTALL_DIR

The Mac seems to insist on a leading hyphen when mixing long and short options. Group "root" does not exist on a Mac.

gmp:

Building gmp with Apples standard Leopard compiler (an Apple modified gcc 4.0.1) needs special treatment. The gmp maintainers seem to have almost given up on supporting the Mac since Apple seem to have introduced strange bugs in gcc due to their "optimization".
Nevertheless, I managed to finally build it with

../$PACKAGENAME$VERSION$VERSIONPATCH/configure --build=none-apple-darwin --prefix=/$INSTALL_DIR

mintlib:

bsd sed as installed on a Mac requires a -e option before the command list after a -i without a backup file argument 

gcc:

Compiling gcc required temporarily uncommenting the rlim_t type definition in the native include file /usr/include/sys/resource.h:

/*
 * Resource limit type (low 63 bits, excluding the sign bit)
 */
#if 0
typedef __uint64_t      rlim_t;
#endif

The mintlib trap bindings needed some tweaking (replace some addq's with lea's).

With the described changes, I was able to generate working cross compiler packages for the Apple platform. I'm now using eclipse on the Mac as development platform.

Again, thanks for your work!

If somebody wants to have the installation files for the Mac cross compiler, I'm happy to send them because I do not have enough room on my web space.

Regards,
Markus