0

I encountered an issue where compiling cryptopp with clang from Xcode 7.2 generates a vxorps instruction in ByteQueue::ByteQueue(unsigned long). Since our product can be run on old CPUs where this instruction triggers illegal instruction I need to tackle this somehow. Can I turn off AVX somehow? Or is the only workaround upgrading Xcode?

Rudolfs Bundulis
  • 11,636
  • 6
  • 33
  • 71
  • 1
    Xcode is based on clang. In regular clang, the baseline is x86-64, and doesn't include AVX. Don't use `-mavx` or `-march=haswell` (or sandybridge) for code that targets CPUs without AVX. – Peter Cordes Mar 14 '18 at 03:46
  • @PeterCordes thanks for the response, I tracked this down to a change in crypto++ which now was using -march=native and thus causing the build machine to pick up the capabilities from the build machine. But I still added -mno-avx just to be safe. – Rudolfs Bundulis Mar 15 '18 at 09:36

0 Answers0