From 5e31c5708393b4e086052c0e7b8cbc57d7ebede3 Mon Sep 17 00:00:00 2001 From: Chip-Kerchner Date: Tue, 7 Nov 2023 20:58:34 -0600 Subject: [PATCH] Only define __builtin_cpu_is and __builtin_cpu_supports if not present. --- driver/others/dynamic_power.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/driver/others/dynamic_power.c b/driver/others/dynamic_power.c index 10a5d64b38..570a875682 100644 --- a/driver/others/dynamic_power.c +++ b/driver/others/dynamic_power.c @@ -202,6 +202,7 @@ static int cpuid(void) #ifndef __BUILTIN_CPU_SUPPORTS__ #include +#if defined(__has_builtin) && !__has_builtin(__builtin_cpu_is) static int __builtin_cpu_is(const char *arg) { static int ipinfo = -1; @@ -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) {