Utilize compiler AVX512 capability info from c_check when building getarch
@@ -71,7 +71,8 @@ endif
getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
- $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
+ avx512=$$(perl c_check - - gcc | grep NO_AVX512); \
+ $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
getarch_2nd : getarch_2nd.c config.h dummy
ifndef TARGET_CORE
