From: taigacon Date: Mon, 23 Apr 2018 22:41:50 +0000 (+0800) Subject: Fix the problem that enables DYNAMIC_BMI2 macro by mistake on ARM architecture with... X-Git-Tag: v1.3.5~3^2~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c3ad058121f0ffa567805a09993c94669f07f3a;p=thirdparty%2Fzstd.git Fix the problem that enables DYNAMIC_BMI2 macro by mistake on ARM architecture with Clang (#1110) --- diff --git a/lib/common/compiler.h b/lib/common/compiler.h index e90a3bcde..b588e1104 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -77,9 +77,9 @@ * Enabled for clang & gcc >=4.8 on x86 when BMI2 isn't enabled by default. */ #ifndef DYNAMIC_BMI2 - #if (defined(__clang__) && __has_attribute(__target__)) \ + #if ((defined(__clang__) && __has_attribute(__target__)) \ || (defined(__GNUC__) \ - && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) \ + && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))) \ && (defined(__x86_64__) || defined(_M_X86)) \ && !defined(__BMI2__) # define DYNAMIC_BMI2 1