From 8c6638ba7c7d129fb0b3db50f3bde7bb39ed436d Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 21 Sep 2019 23:58:20 +0200 Subject: [PATCH] Disable POWER9 with old gcc versions --- driver/others/dynamic_power.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/driver/others/dynamic_power.c b/driver/others/dynamic_power.c index 0c4a87a5e..1dec5f4b3 100644 --- a/driver/others/dynamic_power.c +++ b/driver/others/dynamic_power.c @@ -3,7 +3,9 @@ extern gotoblas_t gotoblas_POWER6; extern gotoblas_t gotoblas_POWER8; +#if (!defined C_GCC) || (GCC_VERSION >= 60000) extern gotoblas_t gotoblas_POWER9; +#endif extern void openblas_warning(int verbose, const char *msg); @@ -19,7 +21,9 @@ static char *corename[] = { char *gotoblas_corename(void) { if (gotoblas == &gotoblas_POWER6) return corename[1]; if (gotoblas == &gotoblas_POWER8) return corename[2]; +#if (!defined C_GCC) || (GCC_VERSION >= 60000) if (gotoblas == &gotoblas_POWER9) return corename[3]; +#endif return corename[0]; } @@ -29,8 +33,10 @@ static gotoblas_t *get_coretype(void) { return &gotoblas_POWER6; if (__builtin_cpu_is("power8")) return &gotoblas_POWER8; +#if (!defined C_GCC) || (GCC_VERSION >= 60000) if (__builtin_cpu_is("power9")) return &gotoblas_POWER9; +#endif return NULL; } @@ -53,7 +59,9 @@ static gotoblas_t *force_coretype(char * coretype) { { case 1: return (&gotoblas_POWER6); case 2: return (&gotoblas_POWER8); +#if (!defined C_GCC) || (GCC_VERSION >= 60000) case 3: return (&gotoblas_POWER9); +#endif default: return NULL; } snprintf(message, 128, "Core not found: %s\n", coretype);