On 3 August 2016 at 10:58, Gao, Liming <firstname.lastname@example.org> wrote:
Ard:For example, when building ArmVirtQemu for ARM, you may get warnings
(or errors when -Werror is enabled) like
lto1: warning: switch -mcpu=cortex-a15 conflicts with -march=armv7-a switch
where cortex-a15 is the target set by the platform .DSC, and armv7-a
is the default target of the compiler.
In this particular example, that does not cause any issues, since
cortex-a15 is compatible with armv7-a. However, if you are building
for ARM11, the code generation performed by the linker will generate
incompatible code unless we pass it the -mcpu=arm11 option as well.
The same applies to things like -mstrict-alignment and -mcmodel=xxx. I
suppose the same issue exists for IA32, where the -march/-mcpu options
in the platform may deviate from the compiler's default.