#37732: fortran compilers don't accept -arch flags ---------------------+-------------------------------- Reporter: mojca@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.1.2 Keywords: | Port: ---------------------+-------------------------------- gfortran-mp-4.X fails when the compiler flag {{{-arch xxx}}} is set. On the other hand {{{g95}}} simply ignores the flag (it has no influence). {{{
gfortran-mp-4.5 -arch x86_64 a.f f951: error: unrecognized command line option "-arch" }}}
This seems in contradiction to the information on http://www.microscopy.cen.dtu.dk/computing/fortran/index.html though which provides a counter example: {{{ gfortran -arch x86_64 -arch i386 -arch ppc hello.f -o hello }}} so I'm still confused a bit. It seems that one can use {{{-m32}}} with both to get 32-bit i386 binaries, but I cannot try it out without recompiling gcc with {{{+universal}}} and I don't know yet how to make universal binaries with that approach. If I try to use cmake Portgroup (but I didn't yet test without it), it automatically adds {{{-arch x86_64}}} to FFLAGS and the compilation fails. See also #37034 and #37688. After writing the description I have also found this ticket #20361 and r54236 which made me believe that the wrong behaviour might have been fixed earlier and introduced again later (but I didn't try to understand the tcl code). -- Ticket URL: <https://trac.macports.org/ticket/37732> MacPorts <http://www.macports.org/> Ports system for Mac OS