gm2
[Top][All Lists]
Advanced

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

Re: Building gm2, where to start?


From: Gaius Mulley
Subject: Re: Building gm2, where to start?
Date: Wed, 20 Dec 2023 22:06:22 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Ben Stuyts <ben@altus-escon.com> writes:

> Hi all,
>
> First, thank you Gaius for all the great work on gm2 and it’s great to see it 
> is now a standard part of gcc.
>
> Many years ago I played around with gm2, using the patch files that
> Gaius provided. I’d like to get into it again but I am at a loss about
> the instructions for building (or even getting) it. So a few questions
> please:
>
> - Can somebody please point me to the correct gcc git repo I should use to 
> get the latest and greatest?
> - Are the build instructions the same as the usual gcc, but with the added 
> gm2 (m2?) language specified?
>
> I’d like to build it on FreeBSD-amd64, FreeBSD-aarch64 and maybe MacOS
> Sonoma on an M2. But I read in some messages that the latter has quite
> a few problems to get it to compile.
>
> Unfortunately the prebuilt packages for FreeBSD do not have gm2
> enabled as far as I can tell, so those are not a good starting point
> for me. And anyway, I’d rather have a git repo with Gaius’ latest
> patches in it.
>
> Thanks,
> Ben

Hi Ben,

welcome back!  gm2 is now in the gcc git, a minimal clone and build
could be (depending upon your system):

$ git clone git://gcc.gnu.org/git/gcc.git gcc-git

If you are behind a firewall that does not allow the git protocol
through, you can replace git:// with https://.

Building
========

$ cd gcc-git
$ mkdir build
$ cd build
$ ../configure --enable-languages=m2 --prefix=$HOME/opt
$ make -j 30
$ make install
$ make check-m2 -j 30   # testsuite running is optional (dejagnu needs
                        # to be installed)

Running the compiler
====================

$ export PATH=$HOME/opt/bin:$PATH
$ gm2 hello.mod
$ export LD_LIBRARY_PATH=$HOME/opt/lib64:$LD_LIBRARY_PATH
$ ./a.out

hope this helps,

regards,
Gaius



reply via email to

[Prev in Thread] Current Thread [Next in Thread]