Fix __builtin_cpu_supports(aes) for GCC 6-9

This commit is contained in:
Cameron Gutman 2024-02-17 13:28:32 -06:00
parent 32be1b158b
commit 919e44b29b

View file

@ -155,7 +155,7 @@ bool StreamUtils::hasFastAes()
#define __has_builtin(x) 0
#endif
#if __has_builtin(__builtin_cpu_supports) && defined(Q_PROCESSOR_X86)
#if (__has_builtin(__builtin_cpu_supports) || (defined(__GNUC__) && __GNUC__ >= 6)) && defined(Q_PROCESSOR_X86)
return __builtin_cpu_supports("aes");
#elif defined(__BUILTIN_CPU_SUPPORTS__) && defined(Q_PROCESSOR_POWER)
return __builtin_cpu_supports("vcrypto");