I would quite like to resurrect my openkick project. As I note on that project's README.md, it is stalled because GNU GCC is not fit for purpose.
Sadly, there do not seem to be any other modern compilers which still have (or ever had) m68k support. The LLVM backend appeared to be my best bet but the architecture-specific code-generator is woefully underdocumented and rather brittle and my attempts to add a m68k backend are not promising. There are already a handful of incomplete m68k backends on github (e.g. kwaters/llvm-m68k, SamuraiCrow/llvm-m68k and Peylow/llvm), but those can barely even process trivial straight-line code and are on a par with my own efforts.
So is there another solution that I've missed? There seem to be (at least) three options:
- Find a port of gcc that supports regparm on m68k and actually pays attention to
-fomit-frame-pointer
so that it doesn't interfere with the Amiga's standard library-calling convention; - Find a more complete m68k backend for LLVM; or
- Find another compiler that has a decent m68k backend.
I would strongly prefer that the compiler understand C++11, which both GCC and clang support, and can be made to run on MacOS. I can backport my code to C++98 if necessary, but booting up an emulator or VM to run some obscure ancient executables would foul up my workflow.
Edit 2016-05-22 1314 CEST:
rrrzx pointed out vbcc in a comment, so I gave it a spin. The upside is that it supports register parameters and doesn't take A6 for its own purposes, so it can be used to cross-compile Amiga binaries without having to fight the compiler as is the case with gcc. The downside is that it is C-only, and its optimiser and code generator are pretty dire.
Edit 2018-08-18 1817 CEST:
My eventual solution was to bodge regparm support into gcc, and it has proven reliable enough for my purposes. You can find it in the mooli/gcc-amiga repository on GitHub.
pcc
- Portable C Compiler - was used to build parts of the very first Amiga OS sources. It was resurrected recently (although I'm not sure if it's very active) at pcc.ludd.ltu.se. I quick nosey at the source code shows that it supports an m68k backend. May be worth a look.