1.33 -march

Targets an architecture profile, generating generic code that runs on any processor of that architecture.

Note

This topic includes descriptions of [ALPHA] features.

Syntax

To specify a target architecture, use:
-march=name
-march=name[+[no]feature+…] (for architectures with optional extensions)
Where:
name
Specifies the architecture.
To view a list of all the supported architectures, use:
-march=list
The following are valid -march values:
armv8-a
ARMv8 application architecture profile. Valid with both --target=aarch64-arm-none-eabi and --target=arm-arm-none-eabi.
armv8.1-a
ARMv8.1 application architecture profile. Valid with both --target=aarch64-arm-none-eabi and --target=arm-arm-none-eabi.
[ALPHA] armv8.2-a
ARMv8.2 application architecture profile. Valid with both --target=aarch64-arm-none-eabi and --target=arm-arm-none-eabi.
armv8-r
ARMv8 real-time architecture profile. Only valid with --target=arm-arm-none-eabi.
armv8-m.base
ARMv8 baseline microcontroller architecture profile. Derived from the ARMv6-M architecture. Only valid with --target=arm-arm-none-eabi.
armv8-m.main
ARMv8 mainline microcontroller architecture profile. Derived from the ARMv7-M architecture. Only valid with --target=arm-arm-none-eabi.
armv7-a
ARMv7 application architecture profile. Only valid with --target=arm-arm-none-eabi.
armv7-r
ARMv7 real-time architecture profile. Only valid with --target=arm-arm-none-eabi.
armv7-m
ARMv7 microcontroller architecture profile. Only valid with --target=arm-arm-none-eabi.
armv7e-m
ARMv7 microcontroller architecture profile with DSP extension. Only valid with --target=arm-arm-none-eabi.
armv6-m
ARMv6 microcontroller architecture profile. Only valid with --target=arm-arm-none-eabi.
feature
Enables or disables an optional architectural feature. See the documentation for -mcpu.

Default

For AArch64 targets (--target=aarch64-arm-none-eabi), unless you target a particular processor using -mcpu, the compiler defaults to -march=armv8-a, generating generic code for ARMv8-A in AArch64 state.
For AArch32 targets (--target=arm-arm-none-eabi), there is no default. You must specify either -march (to target an architecture) or -mcpu (to target a processor).
Related reference
1.37 -mcpu
1.34 -marm
1.43 -mthumb
1.48 --target
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.