From c664beb5a650c51db7358a1bcc1610b7b5719c04 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Tue, 12 Nov 2019 13:31:24 +0000 Subject: [PATCH] Fix the build on arm https://gitlab.freedesktop.org/mesa/mesa/issues/2042 --- fix-arm-build.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ mesa.spec | 3 +++ 2 files changed, 47 insertions(+) create mode 100644 fix-arm-build.patch diff --git a/fix-arm-build.patch b/fix-arm-build.patch new file mode 100644 index 0000000..6e29f6b --- /dev/null +++ b/fix-arm-build.patch @@ -0,0 +1,44 @@ +From 0cb5c96a83e3da2986fc8219b10671a7caea9ee5 Mon Sep 17 00:00:00 2001 +From: Luis Mendes +Date: Sat, 9 Nov 2019 23:21:05 +0000 +Subject: [PATCH] radv: fix radv secure compile feature breaks compilation on + armhf EABI and aarch64 + +__NR_select is not defined the same way across architectures, sometimes is +not even defined, like in armhf EABI and aarch64. + +Signed-off-by: Luis Mendes + +Acked-by: Timothy Arceri + +Acked-by: Samuel Pitoiset + +Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2042 +--- + src/amd/vulkan/radv_device.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c +index 93763c4ae4c..a608c39c5e5 100644 +--- a/src/amd/vulkan/radv_device.c ++++ b/src/amd/vulkan/radv_device.c +@@ -2006,8 +2006,16 @@ static int install_seccomp_filter() { + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, AUDIT_ARCH_X86_64, 0, 12), + + /* Futex is required for mutex locks */ ++ #if defined __NR__newselect ++ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))), ++ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, __NR__newselect, 11, 0), ++ #elif defined __NR_select + BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, __NR_select, 11, 0), ++ #else ++ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))), ++ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, __NR_pselect6, 11, 0), ++ #endif + + /* Allow system exit calls for the forked process */ + BPF_STMT(BPF_LD + BPF_W + BPF_ABS, (offsetof(struct seccomp_data, nr))), +-- +2.22.0 + diff --git a/mesa.spec b/mesa.spec index ba8bcdc..884c486 100644 --- a/mesa.spec +++ b/mesa.spec @@ -62,6 +62,9 @@ Source0: https://mesa.freedesktop.org/archive/%{name}-%{ver}.tar.xz # Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD. Source1: Mesa-MLAA-License-Clarification-Email.txt +# https://gitlab.freedesktop.org/mesa/mesa/issues/2042 +Patch0: fix-arm-build.patch + Patch3: 0003-evergreen-big-endian.patch BuildRequires: meson >= 0.45