Re: Choosing the right -march target architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2 September 2015 at 12:21, Jonathan Wakely wrote:
> On 2 September 2015 at 12:10, Mason wrote:
>> On 02/09/2015 12:13, Jonathan Wakely wrote:
>>
>>> On 2 September 2015 at 08:43, Mason wrote:
>>>> Is there a way to say:
>>>> "Use any instruction available for this uarch, but optimize code
>>>> for this other uarch / class of uarches (mtune=generic)" ??
>>>
>>> Yes, just use both -march and -mtune. e.g.
>>>
>>> -march=pentium3 -mtune-generic
>>
>> The doc states:
>>
>> "Specifying -march=cpu-type implies -mtune=cpu-type."
>>
>> Are you suggesting that -mtune can later be overridden?
>
> Yes.
>
>> In which case order matters (-march first, then -mtune) right?
>
> Yes.

This is no different to just using -mtune several times:

-mtune=pentiumpro -mtune=pentium3 -mtune=pentiumpro

The last such option will be used.

Specifying march=arch implies -mtune=arch, but a later -mtune will
override it, just like it will override any explicit uses of -mtune
that came earlier.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux