[Top][All Lists]

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

Re: -fmakelist and -fmakeinit unrecognized options for gm2 (GCC) 13.0.0

From: Gaius Mulley
Subject: Re: -fmakelist and -fmakeinit unrecognized options for gm2 (GCC) 13.0.0 20221228
Date: Sat, 14 Jan 2023 05:26:30 +0000

Hi Saifi,

with gm2 (in gcc-13) the linking mechanism has been rewritten and the
option -fmodules  has been removed.
The option -fsources will show which modules are used by the compiler
(including path and whether the definition/implementation is required
to resolve linking order).
In the top level gcc build directory you should be able to:

$ cd gcc
$ make doc/gm2.pdf
$ evince doc/gm2.pdf

gm2 (from gcc-12) used a static scaffold linking mechanism but gm2
(from gcc-13) by default uses a dynamic scaffold mechanism.
[I note that the documentation mentions -fmakeinit (which looks like a bug)]

There are some videos here which might also help:

especially with respect to the question on which modules are being
used.  In the new dynamic linking implementation you can see the
modules at runtime register themselves and initialise themselves etc.
The environment variable GCC_M2LINK_RTFLAG provides similar
functionality to the older -fmodules flag (but at runtime)

$ gm2 -g hello.mod
$ export GCC_M2LINK_RTFLAG=all
$ ./a.out

hope this helps,


On Wed, Dec 28, 2022 at 9:03 PM Stuff Received <> wrote:
> -------- Forwarded Message --------
> Subject: -fmakelist and -fmakeinit unrecognized options for gm2 (GCC)
> 13.0.0 20221228
> Date: Wed, 28 Dec 2022 16:02:56 +0000
> From: Saifi Khan <>
> Reply-To: Saifi Khan <>
> To:
> Hi:
> Have built gcc tree with support for modula-2 as i am exploring modules
> and coroutines.
> $ gm2 --version
> gm2 (GCC) 13.0.0 20221228 (experimental)
> while trying to build a library as detailed on GNU modula-2 page, both
> the options -fmakelist and -fmakeinit are not recognized by gm2.
> In addition, the option -fmodules which displays the path to each
> modules object file is not recognized either.
> Am i missing something here ? Are these options no longer supported ?
> What is the alternative ?
> warm regards
> Saifi.

reply via email to

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