From: Florian Weimer Date: Fri, 25 Mar 2016 10:11:42 +0000 (+0100) Subject: tst-audit10: Fix compilation on compilers without bit_AVX512F [BZ #19860] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a04ea1a9a8586c737a71b1a1b55e15c51a25c1f;p=thirdparty%2Fglibc.git tst-audit10: Fix compilation on compilers without bit_AVX512F [BZ #19860] [BZ# 19860] * sysdeps/x86_64/tst-audit10.c (avx512_enabled): Always return zero if the compiler does not provide the AVX512F bit. (cherry picked from commit f327f5b47be57bc05a4077344b381016c1bb2c11) (cherry picked from commit 4cf055a2a331b7361622dc9ac8993b59c6f0ef59) --- diff --git a/sysdeps/x86_64/tst-audit10.c b/sysdeps/x86_64/tst-audit10.c index a487b408bb0..0df2275f59a 100644 --- a/sysdeps/x86_64/tst-audit10.c +++ b/sysdeps/x86_64/tst-audit10.c @@ -17,13 +17,13 @@ . */ #include -#include int tst_audit10_aux (void); static int avx512_enabled (void) { +#ifdef bit_AVX512F unsigned int eax, ebx, ecx, edx; if (__get_cpuid (1, &eax, &ebx, &ecx, &edx) == 0 @@ -38,6 +38,9 @@ avx512_enabled (void) /* Verify that ZMM, YMM and XMM states are enabled. */ return (eax & 0xe6) == 0xe6; +#else + return 0; +#endif } static int