> On 27 Sep 2023, at 08:25, Andrew Pinski via Fortran <fortran@gcc.gnu.org> 
> wrote:
> 
> On Tue, Sep 26, 2023 at 11:39 PM Richard Biener via Fortran
> <fortran@gcc.gnu.org> wrote:
>> 
>> On Tue, Sep 26, 2023 at 4:44 PM Lingadahally, Vishakha (2023)
>> <vishakha.lingadahally.2...@live.rhul.ac.uk> wrote:
>>> 
>>> Dear GCC Team,
>>> 
>>> I'm running Ubuntu 22 on my Mac virtually and my gfortran version is 
>>> 11.4.0. When I try to install a certain software package, I encounter the 
>>> following error:
>>> 
>>> gfortran: error: unrecognized argument in option '-mcmodel=medium'
>>> gfortran: note: valid arguments to '-mcmodel=' are: large small tiny
>>> 
>>> Is this due to attempting to run gfortran on arm64 architecture? Could you 
>>> please let me know how I could resolve the issue?
>> 
>> You have to turn to Ubuntu here, -mcmodel=medium is certainly
>> supported in GCC 11, maybe Ubuntu patches out
>> the support?
> 
> Well -mcmodel=medium is the x86_64 specific option while they are
> trying to run on aarch64 which has a different set options.


The current Arm64 port (aarch64 on macOS) only supports the “small” mcmodel
“tiny” is not supported by macOS and we have not yet implemented “large”.

Despite it’s name “small” should suffice as an approximate equivalent for the
x86_64 “medium” (at least on macOS).

So, either you need to change the flag depending on the architecture, or omit it
(on macOS currently GCC only supports the default mcmodel).

We plan to support the “large” model at some stage on Arm64 (but unlikely for
GCC 14)

HTH,
Iain

Reply via email to