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 6AEE93858436 for ; Wed, 27 Sep 2023 07:33:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6AEE93858436 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 1474 invoked from network); 27 Sep 2023 07:33:46 -0000 X-APM-Out-ID: 16958000260147 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; 27 Sep 2023 07:33:46 -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: gfortran: error: unrecognized argument in option '-mcmodel=medium' From: Iain Sandoe In-Reply-To: Date: Wed, 27 Sep 2023 08:33:46 +0100 Cc: Richard Biener , GCC Fortran , pinskia@gmail.com Content-Transfer-Encoding: quoted-printable Message-Id: References: 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: > 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. 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. 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). 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 =E2=80=9Clarge=E2=80=9D model at some stage on = Arm64 (but unlikely for GCC 14) HTH, Iain