diff options
| -rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb.inc | 1 | ||||
| -rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 39c9f4c9d5..f3b8b5eed4 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc | |||
| @@ -24,6 +24,7 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ | |||
| 24 | file://lfs64.patch \ | 24 | file://lfs64.patch \ |
| 25 | file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ | 25 | file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ |
| 26 | file://0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch \ | 26 | file://0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch \ |
| 27 | file://0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch \ | ||
| 27 | " | 28 | " |
| 28 | SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" | 29 | SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" |
| 29 | SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894e48d20" | 30 | SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894e48d20" |
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch new file mode 100644 index 0000000000..11d1724768 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From 1b0c05b53ede7decb3f4dfe6187f9573cab5e0ab Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ruiqiang Hao <Ruiqiang.Hao@windriver.com> | ||
| 3 | Date: Mon, 2 Dec 2024 02:18:46 +0000 | ||
| 4 | Subject: [PATCH] Ensure compatibility with ARMv9 by updating .arch directive | ||
| 5 | |||
| 6 | The pmem_cvap() function currently uses the '.arch armv8.2-a' directive | ||
| 7 | for the 'dc cvap' instruction. This will cause build errors below when | ||
| 8 | compiling for ARMv9 systems. Update the '.arch' directive to 'armv9.4-a' | ||
| 9 | to ensure compatibility with ARMv9 architectures. | ||
| 10 | |||
| 11 | {standard input}: Assembler messages: | ||
| 12 | {standard input}:169: Error: selected processor does not support `retaa' | ||
| 13 | {standard input}:286: Error: selected processor does not support `retaa' | ||
| 14 | make[2]: *** [storage/innobase/CMakeFiles/innobase_embedded.dir/build.make: | ||
| 15 | 1644: storage/innobase/CMakeFiles/innobase_embedded.dir/sync/cache.cc.o] | ||
| 16 | Error 1 | ||
| 17 | |||
| 18 | Upstream-Status: Submitted | ||
| 19 | |||
| 20 | Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com> | ||
| 21 | --- | ||
| 22 | storage/innobase/sync/cache.cc | 2 +- | ||
| 23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 24 | |||
| 25 | diff --git a/storage/innobase/sync/cache.cc b/storage/innobase/sync/cache.cc | ||
| 26 | index 43d642d05b5..af2d1f3d221 100644 | ||
| 27 | --- a/storage/innobase/sync/cache.cc | ||
| 28 | +++ b/storage/innobase/sync/cache.cc | ||
| 29 | @@ -82,7 +82,12 @@ static void pmem_cvap(const void* buf, size_t size) | ||
| 30 | for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE), | ||
| 31 | end= uintptr_t(buf) + size; | ||
| 32 | u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE) | ||
| 33 | +#if defined __ARM_ARCH && __ARM_ARCH == 9 | ||
| 34 | + __asm__ __volatile__(".arch armv9.4-a\n dc cvap, %0" :: "r"(u) : "memory"); | ||
| 35 | +#else | ||
| 36 | __asm__ __volatile__(".arch armv8.2-a\n dc cvap, %0" :: "r"(u) : "memory"); | ||
| 37 | +#endif | ||
| 38 | + | ||
| 39 | __asm__ __volatile__("dmb ishst" ::: "memory"); | ||
| 40 | } | ||
| 41 | |||
| 42 | -- | ||
| 43 | 2.43.0 | ||
| 44 | |||
