Skip to content

Commit 880af05

Browse files
committed
Fix dynamic dispatch P9 for clang.
1 parent 3655632 commit 880af05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

driver/others/dynamic_power.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
extern gotoblas_t gotoblas_POWER6;
55
extern gotoblas_t gotoblas_POWER8;
6-
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
6+
#if ((!defined __GNUC__) || ( __GNUC__ >= 6)) || defined(__clang__)
77
extern gotoblas_t gotoblas_POWER9;
88
#endif
99
#ifdef HAVE_P10_SUPPORT
@@ -27,7 +27,7 @@ char *gotoblas_corename(void) {
2727
if (gotoblas == &gotoblas_POWER6) return corename[1];
2828
#endif
2929
if (gotoblas == &gotoblas_POWER8) return corename[2];
30-
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
30+
#if ((!defined __GNUC__) || ( __GNUC__ >= 6)) || defined(__clang__)
3131
if (gotoblas == &gotoblas_POWER9) return corename[3];
3232
#endif
3333
#ifdef HAVE_P10_SUPPORT
@@ -240,7 +240,7 @@ static gotoblas_t *get_coretype(void) {
240240
#endif
241241
if (__builtin_cpu_is("power8"))
242242
return &gotoblas_POWER8;
243-
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
243+
#if ((!defined __GNUC__) || ( __GNUC__ >= 6)) || defined(__clang__)
244244
if (__builtin_cpu_is("power9"))
245245
return &gotoblas_POWER9;
246246
#endif
@@ -281,7 +281,7 @@ static gotoblas_t *force_coretype(char * coretype) {
281281
case 1: return (&gotoblas_POWER6);
282282
#endif
283283
case 2: return (&gotoblas_POWER8);
284-
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
284+
#if ((!defined __GNUC__) || ( __GNUC__ >= 6)) || defined(__clang__)
285285
case 3: return (&gotoblas_POWER9);
286286
#endif
287287
#ifdef HAVE_P10_SUPPORT

0 commit comments

Comments
 (0)