From patchwork Tue Dec 27 13:03:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 708941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tnwz93Sqrz9t3K for ; Wed, 28 Dec 2016 00:03:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B83412DEA9; Tue, 27 Dec 2016 13:03:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EDMCQOefPejw; Tue, 27 Dec 2016 13:03:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0DDA32DE2F; Tue, 27 Dec 2016 13:03:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 386C41BFCC3 for ; Tue, 27 Dec 2016 13:03:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C9BD12DE2F for ; Tue, 27 Dec 2016 13:03:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HKMSz1qIebwG for ; Tue, 27 Dec 2016 13:03:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout03.t-online.de (mailout03.t-online.de [194.25.134.81]) by silver.osuosl.org (Postfix) with ESMTPS id 8D3292E050 for ; Tue, 27 Dec 2016 13:03:13 +0000 (UTC) Received: from fwd31.aul.t-online.de (fwd31.aul.t-online.de [172.20.26.136]) by mailout03.t-online.de (Postfix) with SMTP id 26A1B420E010; Tue, 27 Dec 2016 14:03:11 +0100 (CET) Received: from fli4l.lan.fli4l (Z2QiPoZXQhJFenIfwRBFm8zTfgmfdL6omXZtu3QiOsdSFvMwDSOQfbWIH3ijjOHQ5r@[84.178.235.183]) by fwd31.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1cLrPG-06ltgG0; Tue, 27 Dec 2016 14:03:06 +0100 Received: from mahler.lan.fli4l ([192.168.1.1]:41124 helo=kuhls.lan.fli4l) by fli4l.lan.fli4l with esmtp (Exim 4.88) (envelope-from ) id 1cLrPF-0007VW-8L; Tue, 27 Dec 2016 14:03:05 +0100 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 27 Dec 2016 14:03:00 +0100 Message-Id: <20161227130301.22831-2-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161227130301.22831-1-bernd.kuhls@t-online.de> References: <20161227130301.22831-1-bernd.kuhls@t-online.de> X-ID: Z2QiPoZXQhJFenIfwRBFm8zTfgmfdL6omXZtu3QiOsdSFvMwDSOQfbWIH3ijjOHQ5r X-TOI-MSGID: c052ddd3-d2d0-478c-99da-d58416d0d6cc Cc: Bernd Kuhls Subject: [Buildroot] [PATCH 2/3] package/x11r7/xserver_xorg-server: Fix build with wayland, part II X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The previous patch is not sufficient to fix a build with wayland support based on http://autobuild.buildroot.net/results/cf0/cf026e9b18e86b9890341612050f4d166a7b822d/ The build still errors out at a later stage during configure: configure: error: Xwayland requires CLOCK_MONOTONIC support. Add a patch from OpenEmbedded to fix the problem. Signed-off-by: Bernd Kuhls --- ...onfigure.ac-Fix-check-for-CLOCK_MONOTONIC.patch | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 package/x11r7/xserver_xorg-server/1.19.0/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch diff --git a/package/x11r7/xserver_xorg-server/1.19.0/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/package/x11r7/xserver_xorg-server/1.19.0/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch new file mode 100644 index 000000000..c5f04bf25 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.19.0/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch @@ -0,0 +1,66 @@ +Discover monotonic clock using compile-time check + +monotonic clock check does not work when cross-compiling. + +Upstream-Status: Denied [Does not work on OpenBSD] +Signed-off-by: Jussi Kukkonen + + + +Original patch follows: + +When xorg-xserver is being cross-compiled, there is currently no way +for us to detect whether the monotonic clock is available on the +target system, because we aren't able to run a test program on the host +system. Currently, in this situation, we default to not use the +monotonic clock. One problem with this situation is that the user will +be treated as idle when the date is updated. + +To fix this situation, we now use a compile-time check to detect whether the +monotonic clock is available. This check can run just fine when we are +cross-compiling. + +Signed-off-by: David James + +Downloaded from +https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f7ab48c..26e85cd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1048,19 +1048,16 @@ if ! test "x$have_clock_gettime" = xno; then + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + fi + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include +- +-int main(int argc, char *argv[[]]) { +- struct timespec tp; +- +- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) ++#include ++int main() { ++#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) ++ #error No monotonic clock ++#endif + return 0; +- else +- return 1; + } +- ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], +- [MONOTONIC_CLOCK="cross compiling"]) ++]])],[MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no]) + + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" +-- +2.1.4 +