summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2026-06-08 10:49:09 +0300
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-06-08 23:16:32 -0700
commitbafc3361bb85ea8aa4b3f4c8f194a9931e94948a (patch)
treedb5045bb347d37c0491f58732793d77c8af7ec9c
parentee3134d2e897998562c480aca29ba2b8792ae8b2 (diff)
downloadmeta-openembedded-bafc3361bb85ea8aa4b3f4c8f194a9931e94948a.tar.gz
mariadb: fix building for the ARMv8.3-A and later systems
Building mariadb for ARMv8.3-A and later, fails with: Assembler messages: {standard input}:169: Error: selected processor does not support `retaa' {standard input}:271: Error: selected processor does not support `retaa' It happens because the pmem_cvap() funciton manually inserts the `.arch armv8-2.a` clause, making GAS believe that retaa instruction (inserted by GCC) is invalid. Replace compiler dependent version by using the generic sys instruction. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb.inc1
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/c21bb11be28ae9b2432b2a661bf38a197cf9514d.patch52
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 9470184d3d..87378e27f1 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -25,6 +25,7 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \
25 file://riscv32.patch \ 25 file://riscv32.patch \
26 file://0001-support-reproducible-builds.patch \ 26 file://0001-support-reproducible-builds.patch \
27 file://0001-storage-mroonga-CMakeLists.txt-fix-reproducible-buil.patch \ 27 file://0001-storage-mroonga-CMakeLists.txt-fix-reproducible-buil.patch \
28 file://c21bb11be28ae9b2432b2a661bf38a197cf9514d.patch \
28 " 29 "
29SRC_URI[sha256sum] = "14783ddc5edd966ff05aa0efd5ed6d3d369ed5b9e4080a448f00f87a9f0a4a6b" 30SRC_URI[sha256sum] = "14783ddc5edd966ff05aa0efd5ed6d3d369ed5b9e4080a448f00f87a9f0a4a6b"
30 31
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/c21bb11be28ae9b2432b2a661bf38a197cf9514d.patch b/meta-oe/recipes-dbs/mysql/mariadb/c21bb11be28ae9b2432b2a661bf38a197cf9514d.patch
new file mode 100644
index 0000000000..a58b6f112f
--- /dev/null
+++ b/meta-oe/recipes-dbs/mysql/mariadb/c21bb11be28ae9b2432b2a661bf38a197cf9514d.patch
@@ -0,0 +1,52 @@
1From c21bb11be28ae9b2432b2a661bf38a197cf9514d Mon Sep 17 00:00:00 2001
2From: Daniel Black <daniel@mariadb.org>
3Date: Thu, 21 May 2026 11:54:35 +1000
4Subject: [PATCH] MDEV-39692 innodb intrinsics fail to compile on ARMv8.3-A and
5 later (but not ARMv9.x)
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Assembler messages:
11{standard input}:169: Error: selected processor does not support `retaa'
12{standard input}:271: Error: selected processor does not support `retaa'
13
14It happens because the pmem_cvap() funciton manually inserts the `.arch
15armv8-2.a` clause, making GAS believe that retaa instruction (inserted
16by GCC) is invalid.
17
18Replaced compiler dependent version by using the generic sys instruction:
19
20__asm__ __volatile__(/* dc cvap, %0 */ "sys #3, c7, c12, 1, %0" ::
21 "r"(u) : "memory");
22
23Co-authored-by: gemini-code-assist
24Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
25Reviewed-by: Marko Mäkelä
26
27Original solution: https://lore.kernel.org/openembedded-devel/20260520113418.2523208-1-dmitry.baryshkov@oss.qualcomm.com/
28
29Upstream-Status: Backport [https://github.com/MariaDB/server/commit/c21bb11be28ae9b2432b2a661bf38a197cf9514d]
30Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
31---
32 storage/innobase/sync/cache.cc | 7 ++-----
33 1 file changed, 2 insertions(+), 5 deletions(-)
34
35diff --git a/storage/innobase/sync/cache.cc b/storage/innobase/sync/cache.cc
36index c5e67709e22b2..064c29d6f0205 100644
37--- a/storage/innobase/sync/cache.cc
38+++ b/storage/innobase/sync/cache.cc
39@@ -82,11 +82,8 @@ static void pmem_cvap(const void* buf, size_t size)
40 for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
41 end= uintptr_t(buf) + size;
42 u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
43-#if defined __ARM_ARCH && __ARM_ARCH == 9
44- __asm__ __volatile__(".arch armv9.4-a\n dc cvap, %0" :: "r"(u) : "memory");
45-#else
46- __asm__ __volatile__(".arch armv8.2-a\n dc cvap, %0" :: "r"(u) : "memory");
47-#endif
48+ __asm__ __volatile__(/* dc cvap, %0 */ "sys #3, c7, c12, 1, %0" ::
49+ "r"(u) : "memory");
50
51 __asm__ __volatile__("dmb ishst" ::: "memory");
52 }