From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id 65D913858C60 for ; Thu, 28 Sep 2023 16:00:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 65D913858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sandoe.co.uk Received: (qmail 75076 invoked from network); 28 Sep 2023 16:00:47 -0000 X-APM-Out-ID: 16959168477507 X-APM-Authkey: 257869/1(257869/1) 4 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 28 Sep 2023 16:00:47 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: [EXT] gfortran: error: unrecognized argument in option '-mcmodel=medium' From: Iain Sandoe In-Reply-To: Date: Thu, 28 Sep 2023 17:00:47 +0100 Cc: GCC Fortran Content-Transfer-Encoding: quoted-printable Message-Id: <44CA9945-A1C9-4AB2-B275-1E56030EECFC@sandoe.co.uk> References: <9572854C-DE41-4B6E-BF4A-4F60B82BF70E@sandoe.co.uk> To: "Lingadahally, Vishakha (2023)" X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,KAM_COUK,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, > On 28 Sep 2023, at 14:56, Lingadahally, Vishakha (2023) = wrote: > Could you please let me know if there happens to be an update = regarding how I might be able to resolve it? when you are on an arm64 machine you need to add "-mcmodel=3Dsmall=E2=80=9D= (applies to Arm) instead of "-mcmodel=3Dmedium=E2=80=9D (applies to = Intel) Iain >=20 > Thanks! >=20 > Warm regards, > Vishakha > ________________________________ > From: Iain Sandoe > Sent: 27 September 2023 08:35 > To: Lingadahally, Vishakha (2023) = > Cc: GCC Fortran > Subject: [EXT] Re: gfortran: error: unrecognized argument in option = '-mcmodel=3Dmedium' >=20 >=20 >=20 >> On 27 Sep 2023, at 08:33, Iain Sandoe wrote: >>=20 >>=20 >>=20 >>> On 27 Sep 2023, at 08:25, Andrew Pinski via Fortran = wrote: >>>=20 >>> On Tue, Sep 26, 2023 at 11:39=E2=80=AFPM Richard Biener via Fortran >>> wrote: >>>>=20 >>>> On Tue, Sep 26, 2023 at 4:44=E2=80=AFPM Lingadahally, Vishakha = (2023) >>>> wrote: >>>>>=20 >>>>> Dear GCC Team, >>>>>=20 >>>>> 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: >>>>>=20 >>>>> gfortran: error: unrecognized argument in option '-mcmodel=3Dmedium'= >>>>> gfortran: note: valid arguments to '-mcmodel=3D' are: large small = tiny >>>>>=20 >>>>> Is this due to attempting to run gfortran on arm64 architecture? = Could you please let me know how I could resolve the issue? >>>>=20 >>>> You have to turn to Ubuntu here, -mcmodel=3Dmedium is certainly >>>> supported in GCC 11, maybe Ubuntu patches out >>>> the support? >>>=20 >>> Well -mcmodel=3Dmedium is the x86_64 specific option while they are >>> trying to run on aarch64 which has a different set options. >>=20 >>=20 >> The current Arm64 port (aarch64 on macOS) only supports the = =E2=80=9Csmall=E2=80=9D mcmodel >> =E2=80=9Ctiny=E2=80=9D is not supported by macOS and we have not yet = implemented =E2=80=9Clarge=E2=80=9D. >>=20 >> Despite it=E2=80=99s name =E2=80=9Csmall=E2=80=9D should suffice as = an approximate equivalent for the >> x86_64 =E2=80=9Cmedium=E2=80=9D (at least on macOS). >>=20 >> So, either you need to change the flag depending on the architecture, = or omit it >> (on macOS currently GCC only supports the default mcmodel). >>=20 >> We plan to support the =E2=80=9Clarge=E2=80=9D model at some stage on = Arm64 (but unlikely for >> GCC 14) >=20 > Ah, and now I see you are not running native so the comments above are = not > relevant. > Iain >=20 >=20 > This email, its contents and any attachments are intended solely for = the addressee and may contain confidential information. In certain = circumstances, it may also be subject to legal privilege. Any = unauthorised use, disclosure, or copying is not permitted. If you have = received this email in error, please notify us and immediately and = permanently delete it. Any views or opinions expressed in personal = emails are solely those of the author and do not necessarily represent = those of Royal Holloway, University of London. It is your responsibility = to ensure that this email and any attachments are virus free.