diff options
-rw-r--r-- | meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch | 54 | ||||
-rw-r--r-- | meta/recipes-graphics/piglit/piglit_git.bb | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch new file mode 100644 index 0000000000..f851a92ceb --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 0fc2c2932699cfd68be96c820fddfdd79b48b788 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 9 Jul 2016 07:52:19 +0000 | ||
4 | Subject: [PATCH] tests: Use FE_UPWARD only if its defined in fenv.h | ||
5 | |||
6 | On ARM, musl does not define FE_* when arch does not have | ||
7 | VFP, (which is right interpretation), therefore check if | ||
8 | its defined before using it | ||
9 | |||
10 | Fixes errors like | ||
11 | |||
12 | tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function) | ||
13 | ret = fesetround(FE_UPWARD); | ||
14 | ^~~~~~~~~ | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | Upstream-Status: Pending | ||
19 | |||
20 | tests/general/roundmode-getintegerv.c | 2 ++ | ||
21 | tests/general/roundmode-pixelstore.c | 2 ++ | ||
22 | 2 files changed, 4 insertions(+) | ||
23 | |||
24 | diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c | ||
25 | index 28ecfaf..5c27579 100644 | ||
26 | --- a/tests/general/roundmode-getintegerv.c | ||
27 | +++ b/tests/general/roundmode-getintegerv.c | ||
28 | @@ -81,7 +81,9 @@ piglit_init(int argc, char **argv) | ||
29 | { | ||
30 | int ret; | ||
31 | bool pass = true; | ||
32 | +#ifdef FE_UPWARD | ||
33 | ret = fesetround(FE_UPWARD); | ||
34 | +#endif | ||
35 | if (ret != 0) { | ||
36 | printf("Couldn't set rounding mode\n"); | ||
37 | piglit_report_result(PIGLIT_SKIP); | ||
38 | diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c | ||
39 | index 9284f43..3fcb396 100644 | ||
40 | --- a/tests/general/roundmode-pixelstore.c | ||
41 | +++ b/tests/general/roundmode-pixelstore.c | ||
42 | @@ -79,7 +79,9 @@ piglit_init(int argc, char **argv) | ||
43 | { | ||
44 | int ret; | ||
45 | bool pass = true; | ||
46 | +#ifdef FE_UPWARD | ||
47 | ret = fesetround(FE_UPWARD); | ||
48 | +#endif | ||
49 | if (ret != 0) { | ||
50 | printf("Couldn't set rounding mode\n"); | ||
51 | piglit_report_result(PIGLIT_SKIP); | ||
52 | -- | ||
53 | 1.8.3.1 | ||
54 | |||
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index f5ef364492..be54b59a1a 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb | |||
@@ -4,6 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" | |||
4 | 4 | ||
5 | SRC_URI = "git://anongit.freedesktop.org/piglit \ | 5 | SRC_URI = "git://anongit.freedesktop.org/piglit \ |
6 | file://0001-cmake-install-bash-completions-in-the-right-place.patch \ | 6 | file://0001-cmake-install-bash-completions-in-the-right-place.patch \ |
7 | file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \ | ||
7 | " | 8 | " |
8 | 9 | ||
9 | # From 2016-07-07 | 10 | # From 2016-07-07 |