1Remove glibc specific function dependencies 2 3Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch 4Signed-off-by: Khem Raj <raj.khem@gmail.com> 5 6--- a/include/my_cpu.h 7+++ b/include/my_cpu.h 8@@ -24,17 +24,16 @@ 9 */ 10 11 #ifdef _ARCH_PWR8 12-#include <sys/platform/ppc.h> 13 /* Very low priority */ 14-#define HMT_very_low() __ppc_set_ppr_very_low() 15+#define HMT_very_low() asm volatile("or 31,31,31") 16 /* Low priority */ 17-#define HMT_low() __ppc_set_ppr_low() 18+#define HMT_low() asm volatile ("or 1,1,1") 19 /* Medium low priority */ 20-#define HMT_medium_low() __ppc_set_ppr_med_low() 21+#define HMT_medium_low() asm volatile ("or 6,6,6") 22 /* Medium priority */ 23-#define HMT_medium() __ppc_set_ppr_med() 24+#define HMT_medium() asm volatile ("or 2,2,2") 25 /* Medium high priority */ 26-#define HMT_medium_high() __ppc_set_ppr_med_high() 27+#define HMT_medium_high() asm volatile("or 5,5,5") 28 /* High priority */ 29 #define HMT_high() asm volatile("or 3,3,3") 30 #else 31@@ -81,7 +80,7 @@ static inline void MY_RELAX_CPU(void) 32 __asm__ __volatile__ ("pause"); 33 #endif 34 #elif defined(_ARCH_PWR8) 35- __ppc_get_timebase(); 36+ __builtin_ppc_get_timebase(); 37 #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) 38 /* Mainly, prevent the compiler from optimizing away delay loops */ 39 __asm__ __volatile__ ("isb":::"memory"); 40--- a/storage/tokudb/PerconaFT/portability/toku_time.h 41+++ b/storage/tokudb/PerconaFT/portability/toku_time.h 42@@ -124,7 +124,7 @@ static inline tokutime_t toku_time_now(v 43 __asm __volatile__ ("mrs %[rt], cntvct_el0" : [rt] "=r" (result)); 44 return result; 45 #elif defined(__powerpc__) 46- return __ppc_get_timebase(); 47+ return __builtin_ppc_get_timebase(); 48 #else 49 #error No timer implementation for this platform 50 #endif 51