aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb/ppc-remove-glibc-dep.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-08-28 08:46:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-28 08:50:37 +0000
commit7fd31e497c7d3dc058c3620358f31d24e83d5007 (patch)
tree4e3127220cccee2b69b0f27de3a25e764fb83479 /main/mariadb/ppc-remove-glibc-dep.patch
parentc48e70f36d4bbe93e00283f1e937ad59fb671561 (diff)
downloadaports-7fd31e497c7d3dc058c3620358f31d24e83d5007.tar.gz
aports-7fd31e497c7d3dc058c3620358f31d24e83d5007.tar.bz2
aports-7fd31e497c7d3dc058c3620358f31d24e83d5007.tar.xz
main/mariadb: upgrade to 10.3.9 and move default config
move default config to /etc/my.cnf and /etc/my.cnf.d/. This is to make it easier to ship default configs for clients, plugins and mysql, without introducing conflicts. We also add a post-upgrade script which makes sure that the skip-networking setting does not disable networking in a pre-existing config on upgrade.
Diffstat (limited to 'main/mariadb/ppc-remove-glibc-dep.patch')
-rw-r--r--main/mariadb/ppc-remove-glibc-dep.patch120
1 files changed, 45 insertions, 75 deletions
diff --git a/main/mariadb/ppc-remove-glibc-dep.patch b/main/mariadb/ppc-remove-glibc-dep.patch
index 3e9580ee02..57f5008b86 100644
--- a/main/mariadb/ppc-remove-glibc-dep.patch
+++ b/main/mariadb/ppc-remove-glibc-dep.patch
@@ -1,79 +1,49 @@
-From f5cf70d9d1dc7f4cbeffb7fb75cbbe08720e3873 Mon Sep 17 00:00:00 2001
-From: Gustavo Romero <gromero@br.ibm.com>
-Date: Sun, 26 Mar 2017 15:08:15 +0000
-Subject: [PATCH] Remove dependency on glibc on PPC
-
-Remove dependency on glibc by using gcc builtin function and no glibc
-wrappers.
-
-Currently there are no surrogates in musl for:
-
- __ppc_get_timebase()
- __ppc_set_ppr_low()
- __ppc_set_ppr_med()
-
-however glibc __ppc_get_timebase() is just a wrapper for GCC builtin
-__builtin_get_timebase() available since GCC 4.8 [1], so assuming that
-aports on ppc64le will never be built using GCC < 4.8 we can just
-switch directly to the GCC builtin function.
-
-Also __ppc_set_ppr_{low,med}() are not available on musl but both
-are simple glibc wrappers on a single asm instruction, hence there
-is no harm in using asm directly instead. Actually, using asm
-directly was the first solution adopted in MariaDB [2].
-
-[1] https://goo.gl/jxLV6O
-[2] https://goo.gl/9bjuVC
-
---- a/storage/xtradb/include/ut0ut.h
-+++ b/storage/xtradb/include/ut0ut.h
-@@ -85,9 +85,8 @@
- the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
- independent way by using YieldProcessor. */
- # define UT_RELAX_CPU() YieldProcessor()
--# elif defined(__powerpc__) && defined __GLIBC__
--#include <sys/platform/ppc.h>
--# define UT_RELAX_CPU() __ppc_get_timebase()
-+# elif defined(__powerpc__)
-+# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
- # else
- # define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
- # endif
-@@ -101,9 +100,8 @@
- #endif
+diff --git a/include/my_cpu.h b/include/my_cpu.h
+index f2e26fca..94599b74 100644
+--- a/include/my_cpu.h
++++ b/include/my_cpu.h
+@@ -24,17 +24,16 @@
+ */
- # if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
+ #ifdef _ARCH_PWR8
-#include <sys/platform/ppc.h>
--# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
--# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
-+# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
-+# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
- # else
- # define UT_LOW_PRIORITY_CPU() ((void)0)
- # define UT_RESUME_PRIORITY_CPU() ((void)0)
---- a/storage/innobase/include/ut0ut.h
-+++ b/storage/innobase/include/ut0ut.h
-@@ -70,9 +70,8 @@
- the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
- independent way by using YieldProcessor. */
- # define UT_RELAX_CPU() YieldProcessor()
--#elif defined(__powerpc__) && defined __GLIBC__
--# include <sys/platform/ppc.h>
--# define UT_RELAX_CPU() __ppc_get_timebase()
-+#elif defined(__powerpc__)
-+# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
+ /* Very low priority */
+-#define HMT_very_low() __ppc_set_ppr_very_low()
++#define HMT_very_low() asm volatile("or 31,31,31")
+ /* Low priority */
+-#define HMT_low() __ppc_set_ppr_low()
++#define HMT_low() asm volatile ("or 1,1,1")
+ /* Medium low priority */
+-#define HMT_medium_low() __ppc_set_ppr_med_low()
++#define HMT_medium_low() asm volatile ("or 6,6,6")
+ /* Medium priority */
+-#define HMT_medium() __ppc_set_ppr_med()
++#define HMT_medium() asm volatile ("or 2,2,2")
+ /* Medium high priority */
+-#define HMT_medium_high() __ppc_set_ppr_med_high()
++#define HMT_medium_high() asm volatile("or 5,5,5")
+ /* High priority */
+ #define HMT_high() asm volatile("or 3,3,3")
#else
- # define UT_RELAX_CPU() do { \
- volatile int32 volatile_var; \
-@@ -90,9 +89,8 @@
- #endif
-
- #if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
--# include <sys/platform/ppc.h>
--# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
--# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
-+# define UT_LOW_PRIORITY_CPU() __asm__ __volatile__ ("or 1,1,1")
-+# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
+@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void)
+ */
+ YieldProcessor();
+ #elif defined(_ARCH_PWR8)
+- __ppc_get_timebase();
++ __builtin_ppc_get_timebase();
+ #else
+ int32 var, oldval = 0;
+ my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED,
+diff --git a/storage/tokudb/PerconaFT/portability/toku_time.h b/storage/tokudb/PerconaFT/portability/toku_time.h
+index c4c45b8e..2f7a07f5 100644
+--- a/storage/tokudb/PerconaFT/portability/toku_time.h
++++ b/storage/tokudb/PerconaFT/portability/toku_time.h
+@@ -110,7 +110,7 @@ static inline tokutime_t toku_time_now(void) {
+ __asm __volatile__ ("mrs %[rt], cntvct_el0" : [rt] "=r" (result));
+ return result;
+ #elif defined(__powerpc__)
+- return __ppc_get_timebase();
++ return __builtin_ppc_get_timebase();
#else
- # define UT_LOW_PRIORITY_CPU() ((void)0)
- # define UT_RESUME_PRIORITY_CPU() ((void)0)
+ #error No timer implementation for this platform
+ #endif