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

Blair Zajac blair at orcaware.com
Sat Jun 29 23:38:31 PDT 2013


On 6/29/13 11:24 PM, Vincent Habchi wrote:
> 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.

My only comment is that +native is ambiguous, maybe name it +arch-native 
or +march-native?

Blair


More information about the macports-dev mailing list