summaryrefslogtreecommitdiffstats
path: root/patches/meson-0.53.1/0004-HACK-enable-NEON-only-for-ARMv7.patch
blob: f6f0dc44818e2265d7c53ce5ecf055792cdb9a17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Tue, 1 Oct 2019 22:30:59 +0200
Subject: [PATCH] HACK: enable NEON only for ARMv7

NEON detection is broken, so just skip it for anything that is not ARMv7.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 mesonbuild/modules/unstable_simd.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mesonbuild/modules/unstable_simd.py b/mesonbuild/modules/unstable_simd.py
index 4c066fb91339..e4b1824a7087 100644
--- a/mesonbuild/modules/unstable_simd.py
+++ b/mesonbuild/modules/unstable_simd.py
@@ -62,6 +62,9 @@ class SimdModule(ExtensionModule):
                 continue
             iset_fname = kwargs[iset] # Might also be an array or Files. static_library will validate.
             args = compiler.get_instruction_set_args(iset)
+            cpu = state.environment.machines.host.cpu
+            if iset == 'neon' and not cpu.startswith('armv7'):
+                args = None
             if args is None:
                 mlog.log('Compiler supports %s:' % iset, mlog.red('NO'))
                 continue