[MacPorts] #51642: gcc49 @4.9.3: does not honor -march=native

MacPorts noreply at macports.org
Mon Oct 9 08:54:22 UTC 2017


#51642: gcc49 @4.9.3: does not honor -march=native
-----------------------+--------------------------------
  Reporter:  noloader  |      Owner:  macports-tickets@…
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.3.4
Resolution:            |   Keywords:
      Port:  gcc49     |
-----------------------+--------------------------------

Comment (by colinhowell):

 I'm glad for pgf's workaround, because I was being bitten by this bug with
 the gcc7 port, using current MacPorts 2.4.2.

 The gcc compiler proper only generates assembly language output, and it
 must invoke an assembler to assemble that output into binary object code.
 All of MacPorts' gcc ports have been configured to use /opt/local/bin/as,
 the old cctools assembler. So by the very nature of this problem, it will
 affect '''every''' GCC port that can generate instructions not recognized
 by that assembler, which means everything from gcc44 onward. With any of
 those compilers, this can happen either through using -march=native to
 generate optimal code for one's own machine, if that machine is reasonably
 new (one with a "Sandy Bridge" processor or newer, so around 2011 or
 newer), or through explicitly asking to generate optimal code for a newer
 architecture (e.g. -march=sandybridge), or through asking to use an
 instruction-set feature (e.g. -mavx) that would generate unrecognized
 instructions.

 Therefore this ticket should be updated to include '''all''' the gcc ports
 from gcc44 on (except for cross-compilers for non-x86 architectures, of
 course) and to mention it still afflicts the latest MacPorts version. This
 is a '''serious''' problem and really should be fixed.

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


More information about the macports-tickets mailing list