diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-03-13 10:37:23 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-03-13 19:41:13 -0800 |
| commit | e68935ce287e2b0abd819180ebd86364c853d055 (patch) | |
| tree | 762000a5813fffdfdaa008b641dc0145c91ff1fc | |
| parent | eaf1cf83849ccb3addcc789e94321cadac799cf7 (diff) | |
| download | meta-openembedded-e68935ce287e2b0abd819180ebd86364c853d055.tar.gz | |
mariadb: Fix build on musl/ppc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb.inc | 2 | ||||
| -rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch | 50 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 27eede6c30..1fbcb71427 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc | |||
| @@ -22,6 +22,8 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz | |||
| 22 | file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ | 22 | file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ |
| 23 | file://0001-stacktrace-t.c-make-the-test-conditional.patch \ | 23 | file://0001-stacktrace-t.c-make-the-test-conditional.patch \ |
| 24 | " | 24 | " |
| 25 | SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch" | ||
| 26 | |||
| 25 | SRC_URI[sha256sum] = "eb4824f6f2c532cd3fc6a6bce7bf78ea7c6b949f8bdd07656b2c84344e757be8" | 27 | SRC_URI[sha256sum] = "eb4824f6f2c532cd3fc6a6bce7bf78ea7c6b949f8bdd07656b2c84344e757be8" |
| 26 | 28 | ||
| 27 | UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" | 29 | UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" |
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch new file mode 100644 index 0000000000..1ca86bcca2 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | Remove glibc specific function dependencies | ||
| 2 | |||
| 3 | Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch | ||
| 4 | Signed-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__ ("":::"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 | ||
