Patchwork [1/6] wayland-native: disable unused macro checks to fix build issue on Centos5.x

login
register
mail settings
Submitter Hongxu Jia
Date March 28, 2014, 9:42 a.m.
Message ID <b67a3e41eb613d97170958cdbf5a2007c400e083.1395996041.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/69505/
State Accepted
Commit 8b63ff3586ddeec7dc1fda271a98d6af019664c0
Headers show

Comments

Hongxu Jia - March 28, 2014, 9:42 a.m.
From: Ting Liu <b28495@freescale.com>

We only build wayland-native for the scanner, so disable the bits we
don't actually need. This avoid build issue on older distro such as
Centos 5.x:
| error: 'O_CLOEXEC' undeclared (first use in this function)
| error: sys/timerfd.h: No such file or directory
| error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
| error: 'TFD_CLOEXEC' undeclared (first use in this function)
| error: 'SFD_CLOEXEC' undeclared (first use in this function)

Signed-off-by: Ting Liu <b28495@freescale.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...disable-macro-checks-not-used-for-scanner.patch | 50 ++++++++++++++++++++++
 meta/recipes-graphics/wayland/wayland_1.4.0.bb     |  4 +-
 2 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch

Patch

diff --git a/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch b/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
new file mode 100644
index 0000000..bf499bb
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
@@ -0,0 +1,50 @@ 
+disable macro checks not used for scanner
+
+We only build wayland-native for the scanner, so disable the bits we don't
+actually need. This avoid build issue on older distro such as Centos 5.x:
+| error: 'O_CLOEXEC' undeclared (first use in this function)
+| error: sys/timerfd.h: No such file or directory
+| error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
+| error: 'TFD_CLOEXEC' undeclared (first use in this function)
+| error: 'SFD_CLOEXEC' undeclared (first use in this function)
+
+Upstream-Status: Pending
+
+Signed-off-by: Ting Liu <b28495@freescale.com>
+---
+ configure.ac | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -41,16 +41,16 @@ AC_SUBST(GCC_CFLAGS)
+ 
+ AC_CHECK_FUNCS([accept4 mkostemp])
+ 
+-AC_CHECK_DECL(SFD_CLOEXEC,[],
+-	      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
+-	      [[#include <sys/signalfd.h>]])
+-AC_CHECK_DECL(TFD_CLOEXEC,[],
+-	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
+-	      [[#include <sys/timerfd.h>]])
+-AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+-	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
+-	      [[#include <time.h>]])
+-AC_CHECK_HEADERS([execinfo.h])
++##AC_CHECK_DECL(SFD_CLOEXEC,[],
++#	      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
++#	      [[#include <sys/signalfd.h>]])
++#AC_CHECK_DECL(TFD_CLOEXEC,[],
++#	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
++#	      [[#include <sys/timerfd.h>]])
++#AC_CHECK_DECL(CLOCK_MONOTONIC,[],
++#	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
++#	      [[#include <time.h>]])
++#AC_CHECK_HEADERS([execinfo.h])
+ 
+ AC_ARG_ENABLE([scanner],
+               [AC_HELP_STRING([--disable-scanner],
+-- 
+1.8.3.2
+
diff --git a/meta/recipes-graphics/wayland/wayland_1.4.0.bb b/meta/recipes-graphics/wayland/wayland_1.4.0.bb
index 604b7f4..9f6419d 100644
--- a/meta/recipes-graphics/wayland/wayland_1.4.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.4.0.bb
@@ -14,7 +14,9 @@  SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
 SRC_URI[md5sum] = "332cf9191837be12638a29265ed7cf46"
 SRC_URI[sha256sum] = "18f33b9f15b4c8b662fb1968e7636e7926b419dfc48de8a164b3a3d7095c5a58"
 
-SRC_URI_append_class-native = " file://just-scanner.patch"
+SRC_URI_append_class-native = " file://just-scanner.patch \
+    file://disable-macro-checks-not-used-for-scanner.patch \
+    "
 EXTRA_OECONF_class-native = "--disable-documentation --enable-scanner"
 
 inherit autotools pkgconfig