From b6af6a5a5a9a8d8b133e2c7a60d7be847d23b2b4 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 7 Oct 2019 20:34:28 +0200 Subject: [PATCH] Handle platforms that lack hwcap.h by falling back to ARMV8 --- driver/others/dynamic_arm64.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/driver/others/dynamic_arm64.c b/driver/others/dynamic_arm64.c index b4ce6b67d..9db9ba17d 100644 --- a/driver/others/dynamic_arm64.c +++ b/driver/others/dynamic_arm64.c @@ -37,8 +37,10 @@ /*********************************************************************/ #include "common.h" +#if (defined OS_LINUX || defined OS_ANDROID) #include #include +#endif extern gotoblas_t gotoblas_ARMV8; extern gotoblas_t gotoblas_CORTEXA57; @@ -105,13 +107,17 @@ static gotoblas_t *force_coretype(char *coretype) { static gotoblas_t *get_coretype(void) { int implementer, variant, part, arch, revision, midr_el1; - + +#if (defined OS_LINUX || defined OS_ANDROID) if (!(getauxval(AT_HWCAP) & HWCAP_CPUID)) { char coremsg[128]; snprintf(coremsg, 128, "Kernel lacks cpuid feature support. Auto detection of core type failed !!!\n"); openblas_warning(1, coremsg); return NULL; } +#else + return NULL; +#endif get_cpu_ftr(MIDR_EL1, midr_el1); /*