[MacPorts] #64986: OpenBLAS fails on 10.6.8 Rosetta: error: unrecognized command-line option '-march=native'

MacPorts noreply at macports.org
Mon Aug 1 21:00:49 UTC 2022


#64986: OpenBLAS fails on 10.6.8 Rosetta: error: unrecognized command-line option
'-march=native'
---------------------------+-------------------------------------------
  Reporter:  barracuda156  |      Owner:  NicosPavlov
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.2
Resolution:                |   Keywords:  powerpc, snowleopard, rosetta
      Port:  OpenBLAS      |
---------------------------+-------------------------------------------

Comment (by barracuda156):

 Replying to [comment:4 kencu]:
 > or maybe you have an installation of macports on 10.6 Intel with ppc set
 as the build arch in macports.conf I guess….

 Yes, exactly.

 That `-march=native` flag comes from x86-specific build settings.
 Apparently because the build system identifies Host with x86.
 Specifically, `Makefile.system` has this:
 {{{
 # On x86_64 build getarch with march=native unless the compiler is PGI.
 This is required to detect AVX512 support in getarch.
 ifeq ($(HOSTARCH), x86_64)
 ifeq ($(findstring pgcc,$(HOSTCC))$(findstring nvc,$(HOSTCC)),)
 GETARCH_FLAGS += -march=native
 endif
 endif
 }}}
 (And Cmake version has the same, though not used by Macports.)

-- 
Ticket URL: <https://trac.macports.org/ticket/64986#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list