Make fallback from P10 to P9 conditional on suitable compiler
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Fri, 11 Dec 2020 22:41:17 +0000 (23:41 +0100)
committerGitHub <noreply@github.com>
Fri, 11 Dec 2020 22:41:17 +0000 (23:41 +0100)
driver/others/dynamic_power.c

index d60ae68fc0adafd9cb4e25f765395cd699fe346a..a2f56d8399f999a5cd1897c3ef69934fddac9189 100644 (file)
@@ -53,8 +53,10 @@ static gotoblas_t *get_coretype(void) {
                return &gotoblas_POWER10;
 #endif
        /* Fall back to the POWER9 implementation if the toolchain is too old or the MMA feature is not set */
+#if (!defined __GNUC__) || ( __GNUC__ >= 6)
        if (__builtin_cpu_is("power10"))
                return &gotoblas_POWER9;
+#endif 
        return NULL;
 }