[Pixman] [PATCH] Make sure iwMMXt is only detected on ARM

Matt Turner mattst88 at gmail.com
Thu Oct 6 09:22:15 PDT 2011


On Thu, Oct 6, 2011 at 12:14 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Thu, Oct 6, 2011 at 7:44 AM, Toms Miks <barvins.test at gmail.com> wrote:
>>>accepting -march=iwmmxt on x86 is a bug in GCC
>>
>> "-march" just tells gcc for what processor it has to generate the code. It
>> does not matter what processor the computer actually has. I mean, it's ok to
>> compile code for ARM on x86 computer, or the other way around.
>
> That's not true.
>
> $ gcc -march=iwmmxt -c iwmmxt.c
> iwmmxt.c:1:0: error: bad value (iwmmxt) for -march= switch

Following up on this, I now understand why I never hit the problem:

mattst88 at localhost ~/projects/pixman $ gcc -march=iwmmxt -march=native
-c iwmmxt.c
iwmmxt.c:1:0: error: bad value (iwmmxt) for -march= switch
mattst88 at localhost ~/projects/pixman $ gcc -march=iwmmxt -march=k8 -c iwmmxt.c
mattst88 at localhost ~/projects/pixman $ gcc -march=iwmmxt -march=corei7
-c iwmmxt.c

Apparently -march=native doesn't override previous -march flags, but
other values do.

Matt


More information about the Pixman mailing list