gm2
[Top][All Lists]
Advanced

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

Re: Building gm2, where to start?


From: john o goyo
Subject: Re: Building gm2, where to start?
Date: Wed, 20 Dec 2023 17:45:55 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

Greetings, Ben.

To add to Gaius' answer...

On 2023-12-20 17:06, Gaius Mulley wrote (in part):
Ben Stuyts <ben@altus-escon.com> writes (in part):

I’d like to build it on FreeBSD-amd64, FreeBSD-aarch64 and maybe MacOS
Sonoma on an M2.

The current gcc-git does not support Apple silicon.  However Iain Sandoz is porting gcc to Apple.  His repository may be fetched from https://github.com/iains/gcc-darwin-arm64.git.  Required s/w was obtained from Homebrew.  I use the following configuration script, which puts the binaries in ~/gcc/arm -- you may wish to change this to another directory.

CC=/opt/homebrew/bin/gcc-13 \
CXX=/opt/homebrew/bin/g++-13 \
../../src/gcc-darwin-arm64/configure \
--prefix=$HOME/gcc/arm \
--exec-prefix=$HOME/gcc/arm  \
--enable-languages=c,c++,m2 \
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk \
--with-mpc=/opt/homebrew \
--with-gmp=/opt/homebrew \
--with-mpfr=/opt/homebrew \
--disable-bootstrap \
--enable-threads=posix

Note that gdb has yet to be ported, though.

Sincerely,
john

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]