amd64 arch and sse optimization

Reinhard Tartler siretart at gmail.com
Mon Feb 3 15:36:02 UTC 2014


On Mon, Feb 3, 2014 at 9:02 AM, Fabian Greffrath <fabian at greffrath.com> wrote:
> Am Montag, den 03.02.2014, 10:41 -0300 schrieb Felipe Sateler:
>> I have some packages that also add (on amd64 and i386) -mtune=generic.
>> This causes the compiler to optimize for the most common cpus, but
>> still be compatible with older ones.
>
> Isn't GCC smart enough to know that it can use SSE optimizations on
> amd64?

I strongly believe it is, if GCC was not, then it should be fixed.

Please be careful with adding those flags. They instruct gcc to emit
code that does not work on some machines. The admitedlyonly way to use
them correctly is to ensure that the emitted code is only used on
machines that actually supports that.

We've been burned with that previously. In Libav, we're installing the
libraries into special "magic" paths that the dynamic linker only
includes if the hardware is capable. This works only on libraries, but
not for programs (and there are still open bugs for that, for instance
with mplayer/mplayer2 and possibly mpv, all for powerpc, admittedly).

If you are unsure on those flags, better not enable them.

-- 
regards,
    Reinhard



More information about the pkg-multimedia-maintainers mailing list