Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62109 closed defect (fixed)

gfortran does not accept option -m64 on arch arm64

Reported by: platipodium (Carsten Lemmen) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: arm64 Cc: tenomoto (Takeshi Enomoto), platipodium (Carsten Lemmen), Dave-Allured (Dave Allured)
Port: netcdf-fortran, gcc-devel

Description

On arm64 with gccdevel (11) the configure script to netcdf-fortran wrongly configures -m64 as a command line option.

FCFLAGS='-pipe -Os -m64'

Attachments (1)

config.log (31.5 KB) - added by platipodium (Carsten Lemmen) 4 years ago.
Log output from ./configure

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by platipodium (Carsten Lemmen)

Attachment: config.log added

Log output from ./configure

comment:1 Changed 4 years ago by platipodium (Carsten Lemmen)

Cc: platipodium added

comment:2 Changed 4 years ago by kencu (Ken)

Oh boy... it would almost be easier to fix up the gcc fortran driver to accept that flag, than it would be to change all of the many buildscripts to somehow know not to send the flag to gcc on arm.

Let me ask upstream.

configure:6759: /opt/local/bin/gfortran-mp-devel -c -pipe -Os -m64 -x f95 conftest.f90 >&5
gfortran-mp-devel: error: unrecognized command-line option '-m64'

comment:4 Changed 4 years ago by kencu (Ken)

Keywords: bigsur removed
Port: gcc-devel added

comment:5 Changed 4 years ago by platipodium (Carsten Lemmen)

Could you think of a workaround until this is fixed upstream?

comment:6 Changed 4 years ago by kencu (Ken)

Upstream put in a fix allowing the gfortran driver on arm64 to accept the m64 flag.

<https://github.com/iains/gcc-darwin-arm64/commit/a2840b63dc4e557cd270d8d5aad87d8d60ca8c53>.

A new version of gcc-devel was put through MacPorts this morning with this commit in it.

<https://github.com/macports/macports-ports/commit/3faf6f298205fdedd3e244631aa47799a8ef2be8>

so this should be fixed once you get that new version of gcc-devel installed.

Please report back success and we can close this.

comment:7 Changed 4 years ago by platipodium (Carsten Lemmen)

port install libgcc-devel @11-20210124_0 gcc-devel @11-20210124_0 netcdf-fortran

Confirmed working for me now. Thanks for reporting this upstream and getting it fixed.

comment:8 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed

comment:9 Changed 4 years ago by jmroot (Joshua Root)

Summary: gfortran incorrectly tries to compile with option -m64 on arch arm64gfortran does not accept option -m64 on arch arm64

comment:10 Changed 4 years ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added
Note: See TracTickets for help on using tickets.