问题
My C++ application (compiled using g++) needs to work on Pentium-4 (32-bit) and above. However, it's typically used with Core2Duo or better processors.
I'm currently using: -march=pentium4 -mtune=pentium4. But some reading has prompted me to think that -march=pentium4 -mtune=generic might be better.
Can anybody shed some light on this? What are the optimal values for march & mtune options in this case?
Platform: GCC 4.1.2 on RHEL 5.3 (32-bit).
回答1:
That would be -march=pentium4 -mtune=core2
, as can be seen on the GCC manual.
来源:https://stackoverflow.com/questions/6779375/whats-optimal-march-mtune-options-for-gcc-for-pentium4-and-above-processors