summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-09-20 00:43:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-23 09:53:08 +0100
commit84e1100d121d9b4147bcc2ba0f5188332c8e0d93 (patch)
tree910744b5b314bcc150fc1073b0cd449b6daba382
parent9baffc1f2a0712d73506bef198e0679622e461bd (diff)
downloadpoky-84e1100d121d9b4147bcc2ba0f5188332c8e0d93.tar.gz
pixman: Fix missing FE_DIVBYZERO on nios2
The FE_DIVBYZERO is missing on nios2 , add a small patch to pixman which checks for the presence of FE_DIVBYZERO and disables the test which depends on it. (From OE-Core rev: a88733677a6d809c2fca8dc5ec14c7cb4a869ea7) Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch65
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb1
2 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch b/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch
new file mode 100644
index 0000000000..a60df5fc08
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch
@@ -0,0 +1,65 @@
1From fcd5eb9bd0e8674a6f4987a8fce7dc1ba8f9320c Mon Sep 17 00:00:00 2001
2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3Date: Thu, 17 Sep 2015 03:08:36 +0200
4Subject: [PATCH] [v3] test: add a check for FE_DIVBYZERO
5
6Some architectures, such as Microblaze and Nios2, currently do not
7implement FE_DIVBYZERO, even though they have <fenv.h> and
8feenableexcept(). This commit adds a configure.ac check to verify
9whether FE_DIVBYZERO is defined or not, and if not, disables the
10problematic code in test/utils.c.
11
12Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13Signed-off-by: Marek Vasut <marex@denx.de>
14Upstream-Status: Submitted
15---
16Changes v1 -> v2:
17
18 * Use the ac_cv_have_decl_FE_DIVBYZERO variable, which is
19 automatically set by AC_CHECK_DECL, to decide whether or not
20 HAVE_FEDIVBYZERO should be defined.
21
22Changes v2 -> v3:
23
24 * Use action-if-yes of AC_CHECK_DECL as suggested in
25 http://lists.freedesktop.org/archives/pixman/2014-February/003176.html
26---
27 configure.ac | 5 +++++
28 test/utils.c | 2 ++
29 2 files changed, 7 insertions(+)
30
31diff --git a/configure.ac b/configure.ac
32index f93cc30..424bfd3 100644
33--- a/configure.ac
34+++ b/configure.ac
35@@ -891,6 +891,11 @@ if test x$have_feenableexcept = xyes; then
36 AC_DEFINE(HAVE_FEENABLEEXCEPT, 1, [Whether we have feenableexcept()])
37 fi
38
39+AC_CHECK_DECL([FE_DIVBYZERO],
40+ [AC_DEFINE(HAVE_FEDIVBYZERO, 1, [Whether we have FE_DIVBYZERO])],
41+ [],
42+ [[#include <fenv.h>]])
43+
44 AC_CHECK_FUNC(gettimeofday, have_gettimeofday=yes, have_gettimeofday=no)
45 AC_CHECK_HEADER(sys/time.h, have_sys_time_h=yes, have_sys_time_h=no)
46 if test x$have_gettimeofday = xyes && test x$have_sys_time_h = xyes; then
47diff --git a/test/utils.c b/test/utils.c
48index 222d4d5..8657966 100644
49--- a/test/utils.c
50+++ b/test/utils.c
51@@ -966,9 +966,11 @@ enable_divbyzero_exceptions (void)
52 {
53 #ifdef HAVE_FENV_H
54 #ifdef HAVE_FEENABLEEXCEPT
55+#ifdef HAVE_FEDIVBYZERO
56 feenableexcept (FE_DIVBYZERO);
57+#endif
58 #endif
59 #endif
60 }
61
62 void
63--
642.1.4
65
diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb b/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
index eae59b62d2..317a568bd6 100644
--- a/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
+++ b/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
@@ -31,6 +31,7 @@ SRC_URI += "\
31 file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \ 31 file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
32 file://mips-export-revert.patch \ 32 file://mips-export-revert.patch \
33 file://asm_include.patch \ 33 file://asm_include.patch \
34 file://0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch \
34" 35"
35 36
36SRC_URI[md5sum] = "8a9e8f14743a39cf303803f369c1f344" 37SRC_URI[md5sum] = "8a9e8f14743a39cf303803f369c1f344"