[oe] [PATCH] cortex-m3: adjusted target cflags

Khem Raj raj.khem at gmail.com
Mon Feb 7 20:19:59 UTC 2011


On Mon, Feb 7, 2011 at 11:39 AM, Mark Hatle <mark.hatle at windriver.com> wrote:
> On 2/7/11 1:33 PM, Khem Raj wrote:
>> On Mon, Feb 7, 2011 at 7:53 AM, Enrico Scholz
>> <enrico.scholz at sigma-chemnitz.de> wrote:
>>> Explicit '-mthumb' is required because Cortex-M3 does not support ARM
>>> instructions and actual flags cause gcc to fail with 'error: target CPU
>>> does not support ARM mode'.
>>>
>>> The '-mcpu=cortex-m3' is shorter than '-march=armv7-m -mtune=cortex-m3'
>>> and enables workarounds like '-mfix-cortex-m3-ldrd'.
>>
>> Does -mcpu=cortex-m3 also cause gcc to tune for cortex-m3 ?
>
> -mcpu=cortex-m3 is equivalent to -march=cortex-m3 -mtune=cortex-m3

is -march=cortex-m3 valid even ? my question was if we select armv7-m
using -march
then gcc knows stuff like oh this arch has a hardware div instruction
but now if we
use -mcpu will it still do it.




More information about the Openembedded-devel mailing list