Skip to content

Commit

Permalink
Only define __builtin_cpu_is and __builtin_cpu_supports if not present.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChipKerchner committed Nov 8, 2023
1 parent 45da7e6 commit 5e31c57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions driver/others/dynamic_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ static int cpuid(void)
#ifndef __BUILTIN_CPU_SUPPORTS__
#include <string.h>

#if defined(__has_builtin) && !__has_builtin(__builtin_cpu_is)
static int __builtin_cpu_is(const char *arg)
{
static int ipinfo = -1;
Expand All @@ -224,12 +225,15 @@ static int __builtin_cpu_is(const char *arg)
}
return 0;
}
#endif

#if defined(__has_builtin) && !__has_builtin(__builtin_cpu_supports)
static int __builtin_cpu_supports(const char *arg)
{
return 0;
}
#endif
#endif

static gotoblas_t *get_coretype(void) {

Expand Down

0 comments on commit 5e31c57

Please sign in to comment.