Error “no such instruction” while assembling project on Mac OS X

拜拜、爱过 提交于 2019-11-28 06:25:05

The short solution would be removing '-march=native' option (at least it worked for me).

capisce

Adding -Wa,-q to the compiler flags fixed this problem for me. From the man pages for as:

-q

     Use the clang(1) integrated assembler instead of the GNU based system assembler.

The -Wa part passes it from the compiler driver to the assembler, much like -Wl passes arguments to the linker.

It appears that you're running a version of as that doesn't know about the AVX extensions. You either need to build a newer gas or use clang to assemble.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!