conflicting switches: -march=armv7-a -mcpu=cortex-a8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
Low
|
Unassigned |
Bug Description
Is combination of -march=armv7-a -mcpu=cortex-a8 or is this an issue with the compiler? Trying mtune instead of mcpu seems to work okay. Didn't find anything related to this from gcc's 4.5 release pages.
$ echo | arm-linux-
<stdin>:1:0: warning: switch -mcpu=cortex-a8 conflicts with -march= switch
/usr/lib/
(.text+0x34): undefined reference to `main'
collect2: ld returned 1 exit status
$ arm-linux-
arm-linux-
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
Changed in gcc-linaro: | |
importance: | Undecided → Low |
Specifying both -march= and -mcpu= is redundant, and may not in fact have done what you expected in previous compiler versions (maybe even depending on the order in which the arguments were given). The -march switch selects a "generic" ARMv7-A CPU, and -mcpu selects specifically a Cortex-A8 CPU with tuning specific for that core.
Either use "-march=armv7-a -mtune=cortex-a8", or just use "-mcpu=cortex-a8".