Enable -march=native through a special option for selected ports

Vincent Habchi vince at macports.org
Sat Jun 29 23:24:15 PDT 2013


Folks,

now that clang-3.3 is out and we have at least one Haswell machine in the wild (the one I’m using presently), I guess it would be nice to enable -march=native (which would, in turn, switch -mavx or -mavx2 on depending on the actual underlying arch), at least for ports that do a lot of intensive computing, e.g. maths or physics related (py-numpy/py-scipy/metis/arpack/cgal/proj/…).

I’ve already modified Atlas in that way. I know this breaks compatibility with binary archives, so I think the best way would be to add a dedicated option (+native ?) that would override the regular flags and unleash the compiler. People seeking for ultimate performance could set it as a default in variants.conf.

Opinion?

Cheers,
Vincent


More information about the macports-dev mailing list