diff options
| author | Ross Burton <ross@burtonini.com> | 2021-09-01 16:32:01 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-02 12:12:08 +0100 |
| commit | e1986db49b89416961e35d026043f504db36d82e (patch) | |
| tree | 79eb415cee9fc3c9e7f6a54388746916da558c8e /meta/recipes-graphics/mesa/files | |
| parent | 9facca6e303af2b0375a08b23664fa8da9071e01 (diff) | |
| download | poky-e1986db49b89416961e35d026043f504db36d82e.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.
(From OE-Core rev: f3d82abb781c2642a50a60033641194d1e40c212)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/files')
| -rw-r--r-- | meta/recipes-graphics/mesa/files/without-neon.patch | 53 |
1 files changed, 53 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 @@ | |||
| 1 | Since 80923e8d ("util/format: Add some NEON intrinsics-based u_format_unpack.") | ||
| 2 | upstream the build fails on Arm platforms which use the soft-float ABI, such as | ||
| 3 | qemuarmv5: | ||
| 4 | |||
| 5 | arm_neon.h:31:2: error: #error "NEON intrinsics not available with the | ||
| 6 | soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" | ||
| 7 | |||
| 8 | Take a patch from upstream to check the ABI being used before trying to | ||
| 9 | use NEON instructions. | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12569] | ||
| 12 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 13 | |||
| 14 | From 5dcce985a6dd3b7856d65e21db753e2c7a0f5dd5 Mon Sep 17 00:00:00 2001 | ||
| 15 | From: Adrian Bunk <bunk@debian.org> | ||
| 16 | Date: Thu, 26 Aug 2021 22:35:49 +0300 | ||
| 17 | Subject: [PATCH] util/format: NEON is not available with the soft-float ABI | ||
| 18 | |||
| 19 | Fixes: 80923e8d58cc ("util/format: Add some NEON intrinsics-based u_format_unpack.") | ||
| 20 | --- | ||
| 21 | src/util/format/u_format.c | 2 +- | ||
| 22 | src/util/format/u_format_unpack_neon.c | 2 +- | ||
| 23 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c | ||
| 26 | index c49b3788c82..31f1f240efc 100644 | ||
| 27 | --- a/src/util/format/u_format.c | ||
| 28 | +++ b/src/util/format/u_format.c | ||
| 29 | @@ -1138,7 +1138,7 @@ static void | ||
| 30 | util_format_unpack_table_init(void) | ||
| 31 | { | ||
| 32 | for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) { | ||
| 33 | -#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined NO_FORMAT_ASM | ||
| 34 | +#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) | ||
| 35 | const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format); | ||
| 36 | if (unpack) { | ||
| 37 | util_format_unpack_table[format] = unpack; | ||
| 38 | diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c | ||
| 39 | index 7456d7aaa88..a4a5cb1f723 100644 | ||
| 40 | --- a/src/util/format/u_format_unpack_neon.c | ||
| 41 | +++ b/src/util/format/u_format_unpack_neon.c | ||
| 42 | @@ -23,7 +23,7 @@ | ||
| 43 | |||
| 44 | #include <u_format.h> | ||
| 45 | |||
| 46 | -#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined NO_FORMAT_ASM | ||
| 47 | +#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) | ||
| 48 | |||
| 49 | /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics | ||
| 50 | * unless you tell it "no really". | ||
| 51 | -- | ||
| 52 | GitLab | ||
| 53 | |||
