<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I was originally using <b class="">-march=native</b> for non-windows, but in my attempts to support embedded architectures learned that this flag is broken and/or does nothing for many compilers (fixed for ARM in gcc 8 I think though).  Enter the glorious work of the folks at Vc: <a href="https://github.com/VcDevel/Vc/blob/master/cmake/OptimizeForArchitecture.cmake" class="">https://github.com/VcDevel/Vc/blob/master/cmake/OptimizeForArchitecture.cmake</a></div><div class=""><br class=""></div><div class="">It’s quite comprehensive, and though it may not be ready for cross-compiling (still testing that, but I have to learn how to cross compile first!), it does appear to support <i class="">native</i> optimizations for embedded architectures.  <b class="">Here is my concern, the following flags are generated</b>:</div><div class=""><br class=""></div><div class="">-march=haswell;-msse2;-msse3;-mssse3;-msse4.1;-msse4.2;-mavx;-mfma;-mbmi2;-mavx2;-mno-sse4a;-mno-xop;-mno-fma4;-mno-avx512f;-mno-avx512vl;-mno-avx512pf;-mno-avx512er;-mno-avx512cd;-mno-avx512dq;-mno-avx512bw</div><div class=""><br class=""></div><div class="">I am concerned only because these flags will be a part of the PUBLIC compile features of a library, Eigen is the main math library backend as well as there are some templated image conversion routines that use SSE2 intrinsics to operate in my library.  Having that many additional flags could ultimately lead to undesirable consequences such as command line arguments being too long?</div><div class=""><br class=""></div><div class="">I’m currently reworking it so that just the highest version (e.g. <b class="">-mavx2</b>) is used, but I’m not sure if I should even be worried about this.</div><div class=""><br class=""></div><div class="">Thanks for any thoughts!</div><div class=""><br class=""></div><div class="">-Stephen</div><div class=""><br class=""></div></body></html>