The GNU C-Compiler with Binutils and other useful tools for cross development
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bebbo 8f5cf79c39 poke min version of MUI to 19 2 weeks ago
baseboards update baseboards to link agains -lpthread too 2 years ago
lib add libamiga, fix sys-includes 4 years ago
patches poke min version of MUI to 19 2 weeks ago
sdk add stdargs to mui.sdk 2 weeks ago
setup refs #209: fix bat2exe.exe if exe is quoted 8 months ago
.gitignore fix gdb build on osx 2 years ago
.project add supprt for newlib, add netinlude, ... lotta changes 3 years ago
.travis.yml make min 1 month ago
Dockerfile Remove unnecessary repository sections and adjust install target 1 year ago
Makefile refs #242: fix generated inline header for ndk13 4 weeks ago refs #222: add support for NDK3.2 2 months ago improved dependencies 4 years ago

amiga-gcc Donate

The GNU C-Compiler with Binutils and other useful tools for cross development

This is a Makefile based approach to build the same files as in the old amigaos-toolchain to reduce the build time.

Right now these tools are build:

  • binutils
  • gcc with libs for C/C++/ObjC
  • fd2sfd
  • fd2pragma
  • ira
  • sfdc
  • vbcc
  • vlink
  • libnix
  • ixemul (not really, but the headers are used)

Short Guide



sudo yum install wget gcc gcc-c++ python git perl-Pod-Simple gperf patch autoconf automake make makedepend bison flex ncurses-devel gmp-devel mpfr-devel libmpc-devel gettext-devel texinfo rsync

Ubuntu, Debian

sudo apt install make wget git gcc g++ lhasa libgmp-dev libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev autoconf rsync

If building with a normal user, the PREFIX directory must be writable (default is /opt/amiga). You can add the user to an appropriate group.


Install Homebrew ( or any other package manager first. The compiler will be installed together with XCode. Once XCode and Homebrew are up install the required packages:

brew install bash wget make lhasa gmp mpfr libmpc flex gettext texinfo gcc make autoconf

By default macOS uses an outdated version of bash. Therefore, on macOS host always pass the the SHELL=/usr/local/bin/bash parameter (or any other valid path pointing to bash), e.g.:

make all SHELL=/usr/local/bin/bash

On macOS it may be also necessary to point to the brew version of gcc make and autoconf, e.g.:

CC=gcc-9 CXX=g++-9 gmake all SHELL=/usr/local/bin/bash

ALSO NOTE If you want m68k-amigaos-gdb then you have to build it with gcc

macOs on Mi1

Native build on M1 Mac has proved difficult at this stage for a number of reasons. I filed (and closed) a separate issue.

We can, however, get an x86 version of the toolchain working on M1 with these steps.

  1. Ensure rosetta is installed. /usr/sbin/softwareupdate --install-rosetta --agree-to-license
  2. Ensure Xcode command line tools are installed xcode-select --install
  3. Install convince Homebrew to install an x86_64 version instead arch -x86_64 /bin/bash -c "$(curl -fsSL". Ensure /usr/local/bin is early in your path.
  4. Use the x86 homebrew to install the required packages arch -x86_64 brew install bash wget make lhasa gmp mpfr libmpc flex gettext texinfo gcc make autoconf
  5. git clone ; cd amiga-gcc
  6. specify x86 when building CC=gcc-10 CXX=g++-10 SHELL=/usr/local/bin/bash arch -x86_64 gmake clean update all.
  7. profit!

Windows with Cygwin

Install cygwin via setup.exe and add wget. Then open cygwin shell and run:

install apt-cyg /bin
apt-cyg install gcc-core gcc-g++ python git perl-Pod-Simple gperf patch automake make makedepend bison flex libncurses-devel python-devel gettext-devel libgmp-devel libmpc-devel libmpfr-devel rsync

Windows with msys2

Precompiled suite with installer:

pacman -S git base-devel gcc flex gmp-devel mpc-devel mpfr-devel ncurses-devel rsync

Also note that you MUST cd into an absolute path e.g. cd /c/msys64/home/test/amiga-gcc/ before running make, or builds may fail, because some files aren't found correctly (that's a msys2 bug).

Ubuntu running on the Windows 10 Linux subsystem

same as normal ubuntu

Howto Clone and Download All You Need

git clone
cd amiga-gcc
make update


make help


make help 		        display this help
make all 		          build and install all
make <target>		      builds a target: binutils, gcc, fd2sfd, fd2pragma, ira, sfdc, vbcc, vlink, libnix, ixemul, libgcc
make clean		        remove the build folder
make clean-<target>	  remove the target's build folder
make clean-prefix	    remove all content from the prefix folder
make update		        perform git pull for all targets
make update-<target>	perform git pull for the given target

display which targets can be build, you'll mostly use *make all *make clean *make clean-prefix

to use NDK3.2 add NDK=3.2 to the make parameters


The default prefix is /opt/amiga. You may specify a different prefix by adding PREFIX=yourprefix to make command. E.g.

make all PREFIX=/here/or/there

The build performs the installation automatically, there is no separate make install step. Because of this, you must make sure that the target PREFIX directory is writable for the user who is doing the build. If the PREFIX directory points to a directory where the user already has appropriate permissions the below steps can be ommited and the directory will be created by the build process.

sudo mkdir /opt/amiga
sudo chgrp users /opt/amiga
sudo chmod 775 /opt/amiga
sudo usermod -a -G users username

After adding the user to the group, you may have to logout and login again to apply the changes to your user.


Simply run make all. Also add -j to speedup the build.

make clean
make clean-prefix
date; make all -j3 >&b.log; date

takes roughly 10 minutes on my laptop running ubuntu. takes forever running cygwin on windows^^.

Kickstart 1.3

If you plan to develop for Kickstart 1.3 you should use -mcrt=nix13 in your compiler commandline

m68k-amigaos-gcc test.cpp -mcrt=nix13

The include files for 1.3 - which are picked up by the compiler if -mcrt=nix13 is used - can be found at <PREFIX>/m68k-amigaos/ndk13-include i.E. /opt/amiga/m68k-amigaos/ndk13-include