Commit 826b64f3 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

libFLAC: Fix link error

The function FLAC__cpu_xgetbv_x86() is declared and defined only
if FLAC__HAS_X86INTRIN is defined. However FLAC__cpu_info() was
calling it even if FLAC__HAS_X86INTRIN was undefined,

Patch-from: lvqcl <lvqcl.mail@gmail.com>
parent 86b36d92
......@@ -322,7 +322,8 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
/*
* now have to check for OS support of AVX instructions
*/
if(info->ia32.avx && ia32_osxsave) {
#ifdef FLAC__HAS_X86INTRIN
if(info->ia32.avx && ia32_osxsave) {
FLAC__uint32 ecr = FLAC__cpu_xgetbv_x86();
if ((ecr & 0x6) != 0x6)
disable_avx(info);
......@@ -332,6 +333,9 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
}
else /* no OS AVX support*/
disable_avx(info);
#else
disable_avx(info);
#endif
#else
info->use_asm = false;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment