mcpu at runtime vs. buildin

What are the differences between compiling for arm with the -mcpu option (eg -mcpu=cortex-a9 ) versus omitting the mcpu option and having build the toolchain by crosstool-ng with CT_ARCH_CPU (the --with-cpu option eg --with-cpu=cortex-a9 ).

The crosstool-ng menuconfig help text specifies that CT_ARCH_CPU :

... is the configuration flag --with-cpu=XXXX, and the runtime flag -mcpu=XXX.

And the gcc documentation states:

--with-cpu=cpu

Specify which cpu variant the compiler should generate code for by default. cpu will be used as the default value of the -mcpu= switch.

(see https://gcc.gnu.org/install/configure.html)

Which implies -mcpu and --with-cpu do both the same, but it seems they behave differently, as shown in question:

Crosstool-ng g++ not compiling c++11 std::current_exception

链接地址: http://www.djcxy.com/p/85792.html

上一篇: 如何整数除法的结果?

下一篇: mcpu在运行时与buildin