[OE-core] [oe-core][PATCH 3/3] wayland-native: disable macro checks not used for scanner

b28495 at freescale.com b28495 at freescale.com
Tue Jan 14 09:49:57 UTC 2014


From: Ting Liu <b28495 at 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 at freescale.com>
---
 ...disable-macro-checks-not-used-for-scanner.patch |   52 ++++++++++++++++++++
 meta/recipes-graphics/wayland/wayland_1.3.0.bb     |    5 ++-
 2 files changed, 56 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.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..8a22079
--- /dev/null
+++ b/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
@@ -0,0 +1,52 @@
+From 0af87a0382ffa4f1f6c81960d5f2ff07d3726529 Mon Sep 17 00:00:00 2001
+From: Ting Liu <b28495 at freescale.com>
+Date: Mon, 13 Jan 2014 16:49:45 +0800
+Subject: [PATCH] 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)
+
+Signed-off-by: Ting Liu <b28495 at freescale.com>
+---
+ configure.ac | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fa924ae..bf1b85a 100644
+--- 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.3.0.bb b/meta/recipes-graphics/wayland/wayland_1.3.0.bb
index 212e08a..a60d02a 100644
--- a/meta/recipes-graphics/wayland/wayland_1.3.0.bb
+++ b/meta/recipes-graphics/wayland/wayland_1.3.0.bb
@@ -14,7 +14,10 @@ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
 SRC_URI[md5sum] = "d16d27081e0871de82d08840c2f133fc"
 SRC_URI[sha256sum] = "2e817685f68a26acd19964d69ddbc4549ba5412114ad95e1a9f5934cce470d6e"
 
-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 \
+"
 
 inherit autotools pkgconfig
 
-- 
1.7.3.4





More information about the Openembedded-core mailing list