[flac-dev] FLAC__SSE_OS change
lvqcl
lvqcl.mail at gmail.com
Tue Jun 28 16:41:58 UTC 2016
Erik de Castro Lopo wrote:
> No, what is needed is a way to disable SSE at run time even if it has
> been compiled in at build time.
It's not possible if ALL flac/libFLAC files are built with
-msse2 option. So the only solution is to remove -msse2 option
from configure.ac.
Unfortunately it will disable all intrinsics for GCC 4.8
and older (and afaik for clang): only if a file was
compiled with -msse option then sse intrinsics are allowed.
-msse2 enables sse and sse2 intrinsics, and so on.
The common way is to compile different files with different
options. For libFLAC it means that all *_sse.c files should be
compiled with -msse switch, all *_sse2.c files should be compiled
with -msse2, and so on. But unfortunately it's not supported in
the current build system.
OTOH, GCC 4.9 (and newer) doesn't require those switches:
now it's possible to set supported instruction set on a per-function
basis. That's what libFLAC does with FLAC__SSE_TARGET(x) macro.
More information about the flac-dev
mailing list