Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4298 from ChipKerchner/fixBuiltinsDyna…
Browse files Browse the repository at this point in the history
…micArch

Only define __builtin_cpu_is and __builtin_cpu_supports if not present.
  • Loading branch information
martin-frbg authored Nov 8, 2023
2 parents 45da7e6 + 4eecccd commit 0a609cc
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(_AIX) || (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(_AIX) || (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 0a609cc

Please sign in to comment.