mcpu vs march

Jeffrey Walton noloader@gmail.com
Fri Aug 9 00:21:00 GMT 2013


On Thu, Aug 8, 2013 at 8:04 PM, Channagoud <ckadabi@codeaurora.org> wrote:
> Hi,
> I wanted to understand the difference of using march vs mcpu as argument to
> gcc.
> I am compiling my code for a cortex-A8 CPU,  what would be better to use:
>
> -mcpu=cortex-a8 or -march=armv7-a
GCC's Hardware Models and Configurations pages
(http://gcc.gnu.org/onlinedocs/gcc/Submodel-Options.html#Submodel-Options)
discusses this in some detail. For ARM
(http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#ARM-Options):

-march=name
    This specifies the name of the target ARM architecture.

-mcpu=name
    This specifies the name of the target ARM processor.

There's also an -mtune which might be of interest.



More information about the Gcc-help mailing list