summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2016-12-26 00:07:39 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2017-01-10 13:12:54 +0100
commitcae9cafb9c536fd5ea40d1457c0ee1fcd6a6aa43 (patch)
tree056d14e33cc95b1644b5082620c024f1ba63e573 /meta-oe/recipes-support
parentf90df2e2f21cf159751e5ba7d6d300b292bc822b (diff)
downloadmeta-openembedded-cae9cafb9c536fd5ea40d1457c0ee1fcd6a6aa43.tar.gz
fftw: work around segfault when checking for presence of ARM NEON
* Mixxx segfaulted during start. Remote debugging lead to function 'really_have_neon()'. * qtractor segfaulted when adding instruments as whysynth or hexter * seems autodetection fails in some other environments too [1]. * if TUNE_FEATURES contain 'neon' we can assume our machine supports NEON so we don't need runtime detection [1] https://github.com/FFTW/fftw3/issues/30 Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/fftw/fftw/0001-NEON-autodetection-segfaults-assume-neon-present.patch80
-rw-r--r--meta-oe/recipes-support/fftw/fftw_3.3.5.bb5
2 files changed, 84 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/fftw/fftw/0001-NEON-autodetection-segfaults-assume-neon-present.patch b/meta-oe/recipes-support/fftw/fftw/0001-NEON-autodetection-segfaults-assume-neon-present.patch
new file mode 100644
index 000000000..6340f42f4
--- /dev/null
+++ b/meta-oe/recipes-support/fftw/fftw/0001-NEON-autodetection-segfaults-assume-neon-present.patch
@@ -0,0 +1,80 @@
1From 97af5a2efbe30726ce4d7c921efed6afc32a314f Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Sun, 25 Dec 2016 13:41:19 +0100
4Subject: [PATCH] NEON autodetection segfaults: assume neon present
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9If TUNE_FEATURES contain 'neon' we can assume our machine supports it
10
11Upstream-Status: Inappropriate [embedded specific]
12
13Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
14---
15 simd-support/neon.c | 46 +---------------------------------------------
16 1 file changed, 1 insertion(+), 45 deletions(-)
17
18diff --git a/simd-support/neon.c b/simd-support/neon.c
19index 86b2cb6..8d6537e 100644
20--- a/simd-support/neon.c
21+++ b/simd-support/neon.c
22@@ -23,54 +23,10 @@
23
24 #if HAVE_NEON
25
26-/* check for an environment where signals are known to work */
27-#if defined(unix) || defined(linux)
28- # include <signal.h>
29- # include <setjmp.h>
30-
31- static jmp_buf jb;
32-
33- static void sighandler(int x)
34- {
35- UNUSED(x);
36- longjmp(jb, 1);
37- }
38-
39- static int really_have_neon(void)
40- {
41- void (*oldsig)(int);
42- oldsig = signal(SIGILL, sighandler);
43- if (setjmp(jb)) {
44- signal(SIGILL, oldsig);
45- return 0;
46- } else {
47- /* paranoia: encode the instruction in binary because the
48- assembler may not recognize it without -mfpu=neon */
49- /*asm volatile ("vand q0, q0, q0");*/
50- asm volatile (".long 0xf2000150");
51- signal(SIGILL, oldsig);
52- return 1;
53- }
54- }
55-
56- int X(have_simd_neon)(void)
57- {
58- static int init = 0, res;
59-
60- if (!init) {
61- res = really_have_neon();
62- init = 1;
63- }
64- return res;
65- }
66-
67-
68-#else
69-/* don't know how to autodetect NEON; assume it is present */
70+/* autodetect NEON broken; assume it is present */
71 int X(have_simd_neon)(void)
72 {
73 return 1;
74 }
75-#endif
76
77 #endif
78--
792.5.5
80
diff --git a/meta-oe/recipes-support/fftw/fftw_3.3.5.bb b/meta-oe/recipes-support/fftw/fftw_3.3.5.bb
index 7bce6f4e5..71adb8905 100644
--- a/meta-oe/recipes-support/fftw/fftw_3.3.5.bb
+++ b/meta-oe/recipes-support/fftw/fftw_3.3.5.bb
@@ -3,7 +3,10 @@ SECTION = "libs"
3LICENSE = "GPLv2" 3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" 4LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
5 5
6SRC_URI = "http://www.fftw.org/fftw-${PV}.tar.gz" 6SRC_URI = " \
7 http://www.fftw.org/fftw-${PV}.tar.gz \
8 file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \
9"
7SRC_URI[md5sum] = "6cc08a3b9c7ee06fdd5b9eb02e06f569" 10SRC_URI[md5sum] = "6cc08a3b9c7ee06fdd5b9eb02e06f569"
8SRC_URI[sha256sum] = "8ecfe1b04732ec3f5b7d279fdb8efcad536d555f9d1e8fabd027037d45ea8bcf" 11SRC_URI[sha256sum] = "8ecfe1b04732ec3f5b7d279fdb8efcad536d555f9d1e8fabd027037d45ea8bcf"
9 12