The GNU Modula-2 front end to GCC

Building GNU Modula-2 grafted on the gcc-11 branch

This is the current stable release of GNU Modula-2. It currently builds cleanly under Debian (stretch, buster) on (i386, amd64, powerpc64le, aarch64) and at the time of writing there is 1 regression failure on the first two platforms.

It is worth reading https://gcc.gnu.org/wiki/InstallingGCC to make sure you have the various support libraries. The combined gm2 and gcc source code is available using git:

$ git clone http://floppsie.comp.glam.ac.uk/gm2 gm2-floppsie
$ cd gm2-floppsie
$ git checkout gm2-11
$ ./contrib/download_prerequisites
$ cd ../..

To build gm2 based on the 10 series of GCC you will need to install:

$ sudo apt-get install gcc-multilib libmpfr-dev libgmp-dev libmpc-dev flex

To configure:

$ mkdir build-gcc-11
$ cd build-gcc-11
$ CXXFLAGS=-g BOOT_CFLAGS=-g CFLAGS=-g \
  ../gm2-floppsie/configure \
  --prefix=$HOME/opt \
  --libexecdir=$HOME/opt/lib \
  --enable-threads=posix \
  --enable-clocale=gnu --enable-languages=c,c++,m2 \
  --disable-multilib --disable-bootstrap --enable-checking

To compile:

$ make -j 1 # substitute 1 with the number of cores available on your host.

To install:

$ make install