aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch
diff options
context:
space:
mode:
authorKhang Nguyen <khang.nguyen.xw@renesas.com>2019-06-20 09:50:47 +0700
committerKhang Nguyen <khang.nguyen.xw@renesas.com>2019-09-24 08:16:26 +0700
commit4ae7143849d1efcfcf21608a8bc41c4c78de7a48 (patch)
tree774eb058818564d280f152094d179333856d0451 /meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch
parent2e5e8e8cb0d1b8429e18f484f18c48d9598eb7c2 (diff)
rcar-gen3: xserver-xorg: Downgrade to use 1.19.6 version
In YP2.8, xserver-xorg was upgraded to 1.20.4. This breaks xserver-xorg congigures: | configure: error: Package requirements (libdrm >= 2.4.89) were not met: | Requested 'libdrm >= 2.4.89' but version of libdrm is 2.4.85 However, Renesas BSP uses libdrm version is 2.4.85. Therefore, let downgrade this version to use 1.19.6. Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com> Change-Id: I2fbf888cf9acb88943d676506e95f63ad8ac4a50
Diffstat (limited to 'meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch')
-rw-r--r--meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch
new file mode 100644
index 0000000..16ec3ed
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch
@@ -0,0 +1,61 @@
+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 <jussi.kukkonen@intel.com>
+
+
+
+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 <davidjames at google.com>
+---
+ 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 <time.h>
+-
+-int main(int argc, char *argv[[]]) {
+- struct timespec tp;
+-
+- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
++#include <unistd.h>
++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
+