summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-09-01 16:32:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-02 12:05:56 +0100
commitf3d82abb781c2642a50a60033641194d1e40c212 (patch)
tree31c7462f26e1558585b0fd71c933b400c7b5be03 /meta/recipes-graphics
parente588cde6aed1e699a055e3481df0f3dc719c9774 (diff)
downloadopenembedded-core-f3d82abb781c2642a50a60033641194d1e40c212.tar.gz
mesa: fix build on Arm V5 with soft float
Since 80923e8d ("util/format: Add some NEON intrinsics-based u_format_unpack.") upstream the build fails on Arm platforms which use the soft-float ABI, such as qemuarmv5: arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" Take a patch from upstream to check the ABI being used before trying to use NEON instructions. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/mesa/files/without-neon.patch53
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc1
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/without-neon.patch b/meta/recipes-graphics/mesa/files/without-neon.patch
new file mode 100644
index 0000000000..56e4aa7769
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/without-neon.patch
@@ -0,0 +1,53 @@
+Since 80923e8d ("util/format: Add some NEON intrinsics-based u_format_unpack.")
+upstream the build fails on Arm platforms which use the soft-float ABI, such as
+qemuarmv5:
+
+ arm_neon.h:31:2: error: #error "NEON intrinsics not available with the
+ soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard"
+
+Take a patch from upstream to check the ABI being used before trying to
+use NEON instructions.
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12569]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 5dcce985a6dd3b7856d65e21db753e2c7a0f5dd5 Mon Sep 17 00:00:00 2001
+From: Adrian Bunk <bunk@debian.org>
+Date: Thu, 26 Aug 2021 22:35:49 +0300
+Subject: [PATCH] util/format: NEON is not available with the soft-float ABI
+
+Fixes: 80923e8d58cc ("util/format: Add some NEON intrinsics-based u_format_unpack.")
+---
+ src/util/format/u_format.c | 2 +-
+ src/util/format/u_format_unpack_neon.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
+index c49b3788c82..31f1f240efc 100644
+--- a/src/util/format/u_format.c
++++ b/src/util/format/u_format.c
+@@ -1138,7 +1138,7 @@ static void
+ util_format_unpack_table_init(void)
+ {
+ for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
+-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined NO_FORMAT_ASM
++#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
+ const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
+ if (unpack) {
+ util_format_unpack_table[format] = unpack;
+diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
+index 7456d7aaa88..a4a5cb1f723 100644
+--- a/src/util/format/u_format_unpack_neon.c
++++ b/src/util/format/u_format_unpack_neon.c
+@@ -23,7 +23,7 @@
+
+ #include <u_format.h>
+
+-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined NO_FORMAT_ASM
++#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
+
+ /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
+ * unless you tell it "no really".
+--
+GitLab
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 2fb823dfb8..35c170cfd6 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -19,6 +19,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
file://0002-meson.build-make-TLS-ELF-optional.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
+ file://without-neon.patch \
"
SRC_URI[sha256sum] = "2c65e6710b419b67456a48beefd0be827b32db416772e0e363d5f7d54dc01787"