summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ghostscript/ghostscript
diff options
context:
space:
mode:
authorBenjamin Bara <benjamin.bara@skidata.com>2023-09-04 17:28:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-05 08:09:13 +0100
commit75335fc2ee03558e36550b4bb378d172aaae04ca (patch)
treee3714719ee9eaab2eb6f29f3ca4128ac1ead0651 /meta/recipes-extended/ghostscript/ghostscript
parent7dcf79b8f8bc0ddf756963548314a5f59e34e90f (diff)
downloadpoky-75335fc2ee03558e36550b4bb378d172aaae04ca.tar.gz
ghostscript: avoid neon on unsupported machines
Disable neon if the machine does not support it. (From OE-Core rev: 22d40fcb984849bc8735bf03b306c3a3b11eb779) Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript')
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/configure.ac-add-option-to-explicitly-disable-neon.patch99
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/configure.ac-add-option-to-explicitly-disable-neon.patch b/meta/recipes-extended/ghostscript/ghostscript/configure.ac-add-option-to-explicitly-disable-neon.patch
new file mode 100644
index 0000000000..7873396045
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/configure.ac-add-option-to-explicitly-disable-neon.patch
@@ -0,0 +1,99 @@
1From fd37229a17822c5ad21a369f670b8a6f6cc6b95b Mon Sep 17 00:00:00 2001
2From: Benjamin Bara <benjamin.bara@skidata.com>
3Date: Mon, 4 Sep 2023 12:16:39 +0200
4Subject: [PATCH] configure.ac: add option to explicitly disable neon
5
6Uncomment an already existing possibility to explicitly disable neon and
7use it on both implemented neon checks.
8
9Upstream-Status: Submitted [https://bugs.ghostscript.com/show_bug.cgi?id=707097]
10
11Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
12---
13 configure.ac | 52 +++++++++++++++++++++++++++++-----------------------
14 1 file changed, 29 insertions(+), 23 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index 09d881dd1..62718e15e 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -749,6 +749,33 @@ SUBCONFIG_OPTS="--build=$build --host=$host"
21 # SUBCONFIG_OPTS="$SUBCONFIG_OPTS --host=$host_alias"
22 #fi
23
24+dnl --------------------------------------------------
25+dnl Check for NEON support
26+dnl --------------------------------------------------
27+save_cflags=$CFLAGS
28+AC_MSG_CHECKING([neon support])
29+CFLAGS="$save_cflags $OPT_CFLAGS -mfpu=neon -mcpu=cortex-a53"
30+HAVE_NEON=""
31+AC_LINK_IFELSE(
32+ [AC_LANG_PROGRAM([#include "arm_neon.h"], [
33+ int32x4_t round = vdupq_n_s32(10);
34+ return(0);
35+ ])],
36+ [HAVE_NEON="-DHAVE_NEON"], [HAVE_NEON=""])
37+
38+AC_ARG_ENABLE([neon], AS_HELP_STRING([--disable-neon],
39+ [Do not use neon instrinsics]), [
40+ if test "x$enable_neon" = xno; then
41+ HAVE_NEON=""
42+ fi])
43+
44+if test "x$HAVE_NEON" != x; then
45+ AC_MSG_RESULT(yes)
46+else
47+ AC_MSG_RESULT(no)
48+fi
49+CFLAGS=$save_cflags
50+
51 dnl --------------------------------------------------
52 dnl Check for libraries
53 dnl --------------------------------------------------
54@@ -971,11 +998,12 @@ if test x$with_tesseract != xno; then
55 [TESS_NEON="-mfpu=neon -mcpu=cortex-a53 -D__ARM_NEON__"],
56 [TESS_NEON=""])
57
58- if test "x$TESS_NEON" != x; then
59+ if test "x$TESS_NEON" != x && test "x$enable_neon" != xno; then
60 AC_MSG_RESULT(yes)
61 TESS_CXXFLAGS="$TESS_CXXFLAGS -DHAVE_NEON"
62 else
63 AC_MSG_RESULT(no)
64+ TESS_NEON=""
65 fi
66
67 CXXFLAGS="$save_cxxflags"
68@@ -2387,28 +2415,6 @@ if test x$WITH_CAL != x0; then
69 AC_MSG_RESULT(no)
70 fi
71
72- AC_MSG_CHECKING([neon support])
73- CFLAGS="$save_cflags $OPT_CFLAGS -mfpu=neon -mcpu=cortex-a53"
74- HAVE_NEON=""
75- AC_LINK_IFELSE(
76- [AC_LANG_PROGRAM([#include "arm_neon.h"], [
77- int32x4_t round = vdupq_n_s32(10);
78- return(0);
79- ])],
80- [HAVE_NEON="-DHAVE_NEON"], [HAVE_NEON=""])
81-
82- #AC_ARG_ENABLE([neon], AS_HELP_STRING([--disable-neon],
83- # [Do not use neon instrinsics]), [
84- # if test "x$enable_neon" = xno; then
85- # HAVE_NEON=""
86- # fi])
87-
88- if test "x$HAVE_NEON" != x; then
89- AC_MSG_RESULT(yes)
90- else
91- AC_MSG_RESULT(no)
92- fi
93-
94 #AC_SUBST(HAVE_SSE4_2)
95 #AC_SUBST(HAVE_NEON)
96 CFLAGS=$save_cflags
97--
982.34.1
99