Source: xorg-server Version: 2:1.19.5-1 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
xorg-server fails to cross build from source, because its configure checks for CLOCK_MONOTONIC with AC_RUN_IFELSE and then figures that for cross compilation CLOCK_MONOTONIC likely is not available. It then gives up, because wayland requires CLOCK_MONOTONIC. I think this is a bad default as it always breaks cross compilation. I propose resorting to a weaker assumption for cross compilation where only the presence of the CLOCK_MONOTONIC declaration is checked and it is assumed working. Since wayland requires CLOCK_MONOTONIC anyway, the check really is only a sanity check. After fixing this, xorg-server cross builds successfully. Please consider applying the attached patch. Helmut
Index: xorg-server-1.19.5/configure.ac =================================================================== --- xorg-server-1.19.5.orig/configure.ac +++ xorg-server-1.19.5/configure.ac @@ -1073,6 +1073,9 @@ fi AC_MSG_RESULT([$MONOTONIC_CLOCK]) +if test "$MONOTONIC_CLOCK" = "cross compiling"; then + AC_CHECK_DECL([CLOCK_MONOTONIC],[MONOTONIC_CLOCK=yes],[MONOTONIC_CLOCK=no],[#include <time.h>]) +fi if test "x$MONOTONIC_CLOCK" = xyes; then AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])