开发者

Compiling a gnu program without sse3

开发者 https://www.devze.com 2022-12-13 21:12 出处:网络
I\'m compiling an app for a device where the architecture does not support sse beyond sse2, and was wondering is it possible to disable compiling with sse3 instructions from GNU autoconf generated con

I'm compiling an app for a device where the architecture does not support sse beyond sse2, and was wondering is it possible to disable compiling with sse3 instructions from GNU autoconf generated configure scripts? I know you can turn it off in gcc/g++ with mno-sse3 option, but it would be nice if开发者_如何学Go I could turn it off at the configuration level rather than generating a make file and then manually inserting that compiler flag...


If you are using the more recent versions of gcc, you can simply do -march=native, and the compiler will handle it for you.

Edit: this option was introduced in gcc 4.2.


Sure. Just set the required flags before calling configure:

$ CFLAGS="-mtune i386" ./configure --enable-this --disable-that ...

You might want to try -march if -mtune does the wrong thing, I haven't tested this lately.

0

精彩评论

暂无评论...
验证码 换一张
取 消