[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1445/8267] piglit: Fix build on musl/arm
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1445/8267] piglit: Fix build on musl/arm
- Date: Sat, 16 Dec 2017 21:50:15 +0000 (UTC)
commit f74ddc6df4819cfdaab0df570b9b5c3d2a5db135
Author: Khem Raj <raj khem gmail com>
Date: Sat Jul 9 01:00:54 2016 -0700
piglit: Fix build on musl/arm
(From OE-Core rev: 336c1caeb86996cd316256ad15f392b9597ae414)
Signed-off-by: Khem Raj <raj khem gmail com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
...e-FE_UPWARD-only-if-its-defined-in-fenv.h.patch | 54 ++++++++++++++++++++
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 0000000..f851a92
--- /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 @@
+From 0fc2c2932699cfd68be96c820fddfdd79b48b788 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj khem gmail com>
+Date: Sat, 9 Jul 2016 07:52:19 +0000
+Subject: [PATCH] tests: Use FE_UPWARD only if its defined in fenv.h
+
+On ARM, musl does not define FE_* when arch does not have
+VFP, (which is right interpretation), therefore check if
+its defined before using it
+
+Fixes errors like
+
+tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function)
+ ret = fesetround(FE_UPWARD);
+ ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj khem gmail com>
+---
+Upstream-Status: Pending
+
+ tests/general/roundmode-getintegerv.c | 2 ++
+ tests/general/roundmode-pixelstore.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c
+index 28ecfaf..5c27579 100644
+--- a/tests/general/roundmode-getintegerv.c
++++ b/tests/general/roundmode-getintegerv.c
+@@ -81,7 +81,9 @@ piglit_init(int argc, char **argv)
+ {
+ int ret;
+ bool pass = true;
++#ifdef FE_UPWARD
+ ret = fesetround(FE_UPWARD);
++#endif
+ if (ret != 0) {
+ printf("Couldn't set rounding mode\n");
+ piglit_report_result(PIGLIT_SKIP);
+diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c
+index 9284f43..3fcb396 100644
+--- a/tests/general/roundmode-pixelstore.c
++++ b/tests/general/roundmode-pixelstore.c
+@@ -79,7 +79,9 @@ piglit_init(int argc, char **argv)
+ {
+ int ret;
+ bool pass = true;
++#ifdef FE_UPWARD
+ ret = fesetround(FE_UPWARD);
++#endif
+ if (ret != 0) {
+ printf("Couldn't set rounding mode\n");
+ piglit_report_result(PIGLIT_SKIP);
+--
+1.8.3.1
+
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index f5ef364..be54b59 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"
SRC_URI = "git://anongit.freedesktop.org/piglit \
file://0001-cmake-install-bash-completions-in-the-right-place.patch \
+ file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
"
# From 2016-07-07
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]