[tracker-miners/tracker-miners-2.1] build: Only require seccomp when the CPU architecture supports it
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/tracker-miners-2.1] build: Only require seccomp when the CPU architecture supports it
- Date: Thu, 21 Feb 2019 10:33:57 +0000 (UTC)
commit d37337736f655e2627124749b4697e0e408df3e2
Author: Mart Raudsepp <leio gentoo org>
Date: Fri Feb 15 21:11:29 2019 +0200
build: Only require seccomp when the CPU architecture supports it
(cherry-picked from b2d4b05a0c9e34b88aaf55b9f52497b07af8e862)
meson.build | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index fd536f2e6..8b580cabb 100644
--- a/meson.build
+++ b/meson.build
@@ -256,7 +256,23 @@ endif
# Check for libseccomp
##################################################################
-if not libseccomp.found() and host_machine.system() == 'linux'
+host_system = host_machine.system()
+host_cpu = host_machine.cpu()
+unsupported_cpus = [
+ 'alpha',
+ 'ia64',
+ 'm68k',
+ 'parisc',
+ 'parisc64',
+ 'sh4',
+ 'sparc',
+ 'sparc64',
+]
+system_supports_seccomp = host_system == 'linux'
+cpu_supports_seccomp = not unsupported_cpus.contains(host_cpu)
+seccomp_required = system_supports_seccomp and cpu_supports_seccomp
+
+if not libseccomp.found() and seccomp_required
error('Libseccomp is mandatory for sandboxed metadata extraction')
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]